summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-05-05 10:04:22 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2010-05-05 13:28:27 (GMT)
commitcbae18e48638cb3fb97dee56c32a2deb5b9af4ad (patch)
tree916d50cbf5c2af0776512c113ec26211b6db0bfa
parentd43037d3cc7f273a7d23ac1162a7498a4230c359 (diff)
downloadQt-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
-rw-r--r--src/gui/kernel/qgesturemanager.cpp3
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
}