Commit 827e195f authored by Richard Moe Gustavsen's avatar Richard Moe Gustavsen Committed by Jani Heikkinen
Browse files

OSX: check if we have a native drag before accessing it


We used to check if [sender draggingSource] != nil to determine
if the current drag was started by the application itself or
somewhere else. While this is correct use of the API, the problem
is that a drag can also be started by UIKit if e.g dragging the
file icon in the titlebar. And in that case, Qt has no no
native drag data. Since we didn't take this usecase into account, we
tried to access the data anyway, which led to a crash.

This patch will instead check if we have native drag data directly
before trying to access it, which will also cover the
usecase mentioned above.

Task-number: QTBUG-46598
Change-Id: Ic91b86f658670b895d90a1533246ba24a00dde41
Reviewed-by: default avatarMorten Johan Sørvig <morten.sorvig@theqtcompany.com>
parent 92cda947
Showing with 6 additions and 4 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment