summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2009-09-07 13:40:44 (GMT)
committerBradley T. Hughes <bradley.hughes@nokia.com>2009-09-07 13:47:44 (GMT)
commitf049c1b99ed41e5ccf6100cb12a0f443481b4ea5 (patch)
treefb7a74dcec6af7b99bf844e900c71262a37c41a7
parent4339c8e87f66a5d42439bca574e92ceef473d433 (diff)
downloadQt-f049c1b99ed41e5ccf6100cb12a0f443481b4ea5.zip
Qt-f049c1b99ed41e5ccf6100cb12a0f443481b4ea5.tar.gz
Qt-f049c1b99ed41e5ccf6100cb12a0f443481b4ea5.tar.bz2
Fix a crash in the Win32 event dispatcher
Not clearing the timerVec and timerDict containers can cause crashes during application shutdown when code tries to unregister timers (that were unregistered in closingDown()). Reviewed-by: dt
-rw-r--r--src/corelib/kernel/qeventdispatcher_win.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win.cpp b/src/corelib/kernel/qeventdispatcher_win.cpp
index 9c308a3..c6ac6d4 100644
--- a/src/corelib/kernel/qeventdispatcher_win.cpp
+++ b/src/corelib/kernel/qeventdispatcher_win.cpp
@@ -1021,6 +1021,8 @@ void QEventDispatcherWin32::closingDown()
// clean up any timers
for (int i = 0; i < d->timerVec.count(); ++i)
d->unregisterTimer(d->timerVec.at(i), true);
+ d->timerVec.clear();
+ d->timerDict.clear();
}
bool QEventDispatcherWin32::event(QEvent *e)