diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index ff23623e9a..bd2da0760d 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -2051,6 +2051,9 @@ void QCoreApplication::quit() if (!self) return; + if (!self->d_func()->in_exec) + return; + self->d_func()->quit(); }