summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qeventdispatcher_win_p.h
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2014-11-20 11:08:13 +0100
committerJani Heikkinen <jani.heikkinen@theqtcompany.com>2014-11-20 16:14:46 +0100
commit087aa1f3cb5975ef55e42db54487f737c93a4f0f (patch)
tree52c163b974a244a0bb99312ad19579e8becfc313 /src/corelib/kernel/qeventdispatcher_win_p.h
parent52f5bf9cd5dd5586dc18b2d7efd833232c2f508a (diff)
Windows: Prevent registration of timers in shutdown phasev5.4.0-rc1
Do not register new timers after closingDown() has been called. They might call back into QEventDispatcherWin32 after the object has been destructed, leading to crashes on exit. registerSocketNotifier has a similar protection using QCoreApplication::closingDown(). This however does not work in all cases, because QEventDispatcher::closingDown() is called in ~QGuiApplication(), while QCoreApplication::is_app_closing is set in ~QCoreApplication(). In between qt_call_post_routines() is called, which might trigger new timers to be registered. Task-number: QTBUG-42772 Change-Id: I91325fb10e38c117c1cbedfee272d0ab6a5ca8fa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/corelib/kernel/qeventdispatcher_win_p.h')
-rw-r--r--src/corelib/kernel/qeventdispatcher_win_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_win_p.h b/src/corelib/kernel/qeventdispatcher_win_p.h
index a68f6cfa28..8022299a76 100644
--- a/src/corelib/kernel/qeventdispatcher_win_p.h
+++ b/src/corelib/kernel/qeventdispatcher_win_p.h
@@ -147,6 +147,7 @@ public:
DWORD threadId;
bool interrupt;
+ bool closingDown;
// internal window handle used for socketnotifiers/timers/etc
HWND internalHwnd;