Fix hover event crash
authorJosh Faust <jfaust@suitabletech.com>
Thu, 1 Aug 2013 22:51:03 +0000 (16:51 -0600)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 12 Aug 2013 19:38:20 +0000 (21:38 +0200)
commitb00a120d4d07d657f3226407cdae797395f63a16
treeb08fb2a7fdcfc3c8f7748783146176a1cf2b9fa1
parent602bec12868365323777298989ef4a1bf559cfac
Fix hover event crash

It was possible for a hover event to be sent to a QQuickItem that has
already been scheduled to be deleted (through deleteLater()). This
lead to an access on an already-freed object when the leave event
is generated. This change ensures that the item is part of a scene
before generating the hover enter event.

Task-number: QTBUG-32771

Change-Id: I69adb6bbd0ae52c70a6bda4e6c918b7671549a4c
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
src/quick/items/qquickwindow.cpp
tests/auto/quick/qquickwindow/data/hoverCrash.qml [new file with mode: 0644]
tests/auto/quick/qquickwindow/tst_qquickwindow.cpp