[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>
This commit is contained in:
parent
df757e30f8
commit
530f985651
@ -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)
|
- 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
|
- dnd takes unusually long time to process data
|
||||||
*/
|
*/
|
||||||
t.drag->deleteLater();
|
if (t.drag)
|
||||||
|
t.drag->deleteLater();
|
||||||
transactions.removeAt(i--);
|
transactions.removeAt(i--);
|
||||||
} else {
|
} else {
|
||||||
stopTimer = false;
|
stopTimer = false;
|
||||||
|
@ -157,7 +157,7 @@ private:
|
|||||||
xcb_window_t proxy_target;
|
xcb_window_t proxy_target;
|
||||||
QWindow *targetWindow;
|
QWindow *targetWindow;
|
||||||
// QWidget *embedding_widget;
|
// QWidget *embedding_widget;
|
||||||
QDrag *drag;
|
QPointer<QDrag> drag;
|
||||||
QTime time;
|
QTime time;
|
||||||
};
|
};
|
||||||
QList<Transaction> transactions;
|
QList<Transaction> transactions;
|
||||||
|
Loading…
Reference in New Issue
Block a user