summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-11-05 12:24:58 (GMT)
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>2009-11-05 13:19:53 (GMT)
commitd724b1708149ec8eac0d7f6ad44161d00c66c1b2 (patch)
treedcd1931ca4c25825a8793a564594f5b3aa31e070 /src
parentec13cf30f10dabce37af3ce9d6763066e8cf4cc4 (diff)
downloadQt-d724b1708149ec8eac0d7f6ad44161d00c66c1b2.zip
Qt-d724b1708149ec8eac0d7f6ad44161d00c66c1b2.tar.gz
Qt-d724b1708149ec8eac0d7f6ad44161d00c66c1b2.tar.bz2
Don't crash in QStateMachine when event transition listens to
QApplication instance We can't assert on actually watching the watched object, since we may have installed an event filter on QApplication::instance(), in which case we will filter events for all objects. Reviewed-by: Gunnar
Diffstat (limited to 'src')
-rw-r--r--src/corelib/statemachine/qstatemachine.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp
index cf951c9..ecf3f9c 100644
--- a/src/corelib/statemachine/qstatemachine.cpp
+++ b/src/corelib/statemachine/qstatemachine.cpp
@@ -1616,9 +1616,8 @@ void QStateMachinePrivate::unregisterEventTransition(QEventTransition *transitio
}
void QStateMachinePrivate::handleFilteredEvent(QObject *watched, QEvent *event)
-{
- Q_ASSERT(qobjectEvents.contains(watched));
- if (qobjectEvents[watched].contains(event->type())) {
+{
+ if (qobjectEvents.value(watched).contains(event->type())) {
postInternalEvent(new QStateMachine::WrappedEvent(watched, handler->cloneEvent(event)));
processEvents(DirectProcessing);
}