diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2009-05-12 12:11:55 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2009-05-12 12:11:55 (GMT) |
commit | f5ac9ac1387fb9aac7c74d686f0b247ac50746e1 (patch) | |
tree | 8efb9b6c1029f8b9c26b96fa5389b1b0623c5163 /src/corelib/kernel/qeventloop.cpp | |
parent | cb369071fa9b15e68f91d2883ee29f12c58fc803 (diff) | |
parent | bc184432c49eb56254bc5db07c6af03718c6b0e7 (diff) | |
download | Qt-f5ac9ac1387fb9aac7c74d686f0b247ac50746e1.zip Qt-f5ac9ac1387fb9aac7c74d686f0b247ac50746e1.tar.gz Qt-f5ac9ac1387fb9aac7c74d686f0b247ac50746e1.tar.bz2 |
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-animations
Diffstat (limited to 'src/corelib/kernel/qeventloop.cpp')
-rw-r--r-- | src/corelib/kernel/qeventloop.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/corelib/kernel/qeventloop.cpp b/src/corelib/kernel/qeventloop.cpp index 92bdf73..600f787 100644 --- a/src/corelib/kernel/qeventloop.cpp +++ b/src/corelib/kernel/qeventloop.cpp @@ -188,8 +188,9 @@ int QEventLoop::exec(ProcessEventsFlags flags) d->threadData->eventLoops.push(this); // remove posted quit events when entering a new event loop - if (qApp->thread() == thread()) - QCoreApplication::removePostedEvents(qApp, QEvent::Quit); + QCoreApplication *app = QCoreApplication::instance(); + if (app && app->thread() == thread()) + QCoreApplication::removePostedEvents(app, QEvent::Quit); #if defined(QT_NO_EXCEPTIONS) while (!d->exit) |