diff options
author | Joona Petrell <joona.t.petrell@nokia.com> | 2010-07-23 02:45:14 (GMT) |
---|---|---|
committer | Joona Petrell <joona.t.petrell@nokia.com> | 2010-07-23 02:45:59 (GMT) |
commit | 455f5d9d7850a070663c0f3d1a419988cc4b3e3a (patch) | |
tree | 201a3b4db085dade4c2a39ef8c94c9353a2268d0 /src/declarative | |
parent | 35d0e655ad9eedf136d5b5da79e516f0e3cad56a (diff) | |
download | Qt-455f5d9d7850a070663c0f3d1a419988cc4b3e3a.zip Qt-455f5d9d7850a070663c0f3d1a419988cc4b3e3a.tar.gz Qt-455f5d9d7850a070663c0f3d1a419988cc4b3e3a.tar.bz2 |
Fix crash in MouseArea
Task-number:
Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativemousearea.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index 40c621a..dcdb9f6 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -521,7 +521,8 @@ void QDeclarativeMouseArea::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) // If we don't accept hover, we need to reset containsMouse. if (!acceptHoverEvents()) setHovered(false); - if (scene()->mouseGrabberItem() == this) + QGraphicsScene *s = scene(); + if (s && s->mouseGrabberItem() == this) ungrabMouse(); setKeepMouseGrab(false); } |