Fix crash in QXcbDrag.

handleStatus() was called with drag==0 when releasing the mouse over the
desktop.

Task-number: QTBUG-33920
Change-Id: I553647d1e734934b7c6caf4c984683cff88f9162
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
Friedemann Kleint 2013-10-16 14:17:28 +02:00 committed by The Qt Project
parent 17809b41a6
commit 7c1b39705c

View File

@ -835,7 +835,7 @@ void QXcbDrag::handle_xdnd_status(const xcb_client_message_event_t *event)
void QXcbDrag::handleStatus(const xcb_client_message_event_t *event)
{
if (event->window != connection()->clipboard()->owner())
if (event->window != connection()->clipboard()->owner() || !drag())
return;
xcb_client_message_event_t *lastEvent = const_cast<xcb_client_message_event_t *>(event);