summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbdrag.cpp
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@digia.com>2014-03-12 15:50:36 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-14 22:39:05 +0100
commit530f9856519e58c7793095a5ac92d49b192d3b0b (patch)
treea66a41186bb142594d9844436b3ba12dbe5724b2 /src/plugins/platforms/xcb/qxcbdrag.cpp
parentdf757e30f816bee8bed5f65ff8e63cec57fe46b1 (diff)
[XCB] Fix crash in QML drag-and-drop
Use QPointer to make sure that we are not trying to destroy already deleted object. Task-number: QTBUG-35702 Change-Id: Ib746996787488e636f25e6ea5be0571607ee2ded Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbdrag.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbdrag.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbdrag.cpp b/src/plugins/platforms/xcb/qxcbdrag.cpp
index e931b96b88..4f0f57c375 100644
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
@@ -1044,7 +1044,8 @@ void QXcbDrag::timerEvent(QTimerEvent* e)
- showing dialog box on drop event where user's response takes more time than XdndDropTransactionTimeout (QTBUG-14493)
- dnd takes unusually long time to process data
*/
- t.drag->deleteLater();
+ if (t.drag)
+ t.drag->deleteLater();
transactions.removeAt(i--);
} else {
stopTimer = false;