diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2013-03-04 21:25:39 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-05 08:31:23 +0100 |
commit | 7a5fea113ec6088135b0b6a0fc4297e0ef362bc5 (patch) | |
tree | 0101a17952fa22b466627f1d3ff4efa1bf629951 /src/gui/kernel/qwindowsysteminterface_p.h | |
parent | 09fb084e3a16ea3cbca896e270ff7d9bd6b6c313 (diff) |
Fix crash in flushWindowSystemEvents() in QGuiApplication-cleanup.
Check for existence of QGuiApplication, discard events if it is 0.
Change-Id: I04b27679033fb13ef2fa38e39757d89465cba94b
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface_p.h')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface_p.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h index 431b2cbe1e..eca559abfa 100644 --- a/src/gui/kernel/qwindowsysteminterface_p.h +++ b/src/gui/kernel/qwindowsysteminterface_p.h @@ -387,9 +387,10 @@ public: mutable QMutex mutex; public: WindowSystemEventList() : impl(), mutex() {} - ~WindowSystemEventList() - { const QMutexLocker locker(&mutex); qDeleteAll(impl); impl.clear(); } + ~WindowSystemEventList() { clear(); } + void clear() + { const QMutexLocker locker(&mutex); qDeleteAll(impl); impl.clear(); } void prepend(WindowSystemEvent *e) { const QMutexLocker locker(&mutex); impl.prepend(e); } WindowSystemEvent *takeFirstOrReturnNull() |