diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-05-05 10:04:22 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2010-05-05 13:28:27 (GMT) |
commit | cbae18e48638cb3fb97dee56c32a2deb5b9af4ad (patch) | |
tree | 916d50cbf5c2af0776512c113ec26211b6db0bfa /src/gui/kernel/qgesturemanager.cpp | |
parent | d43037d3cc7f273a7d23ac1162a7498a4230c359 (diff) | |
download | Qt-cbae18e48638cb3fb97dee56c32a2deb5b9af4ad.zip Qt-cbae18e48638cb3fb97dee56c32a2deb5b9af4ad.tar.gz Qt-cbae18e48638cb3fb97dee56c32a2deb5b9af4ad.tar.bz2 |
Fixes a crash in QGestureManager
Work around the case when we reach QGestureManager indirectly from
QGraphicsObject destructor.
Task-number: QT-3262
Reviewed-by: Thomas Zander
Diffstat (limited to 'src/gui/kernel/qgesturemanager.cpp')
-rw-r--r-- | src/gui/kernel/qgesturemanager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index 6ce7667..9495f40 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -185,6 +185,9 @@ QGesture *QGestureManager::getState(QObject *object, QGestureRecognizer *recogni #ifndef QT_NO_GRAPHICSVIEW } else { Q_ASSERT(qobject_cast<QGraphicsObject *>(object)); + QGraphicsObject *graphicsObject = static_cast<QGraphicsObject *>(object); + if (graphicsObject->QGraphicsItem::d_func()->inDestructor) + return 0; #endif } |