File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -153,8 +153,10 @@ void MessageManager::runDispatchLoop()
153153
154154void MessageManager::stopDispatchLoop ()
155155{
156- ( new QuitMessage ())-> post () ;
156+ quitMessageReceived = true ;
157157 quitMessagePosted = true ;
158+
159+ (new QuitMessage ())->post ();
158160}
159161
160162#if YUP_MODAL_LOOPS_PERMITTED
Original file line number Diff line number Diff line change @@ -338,6 +338,12 @@ bool yup_dispatchNextMessageOnSystemQueue (bool returnIfNoPendingMessages)
338338 if (LinuxErrorHandling::keyboardBreakOccurred)
339339 YUPApplicationBase::quit ();
340340
341+ if (auto * mm = MessageManager::getInstanceWithoutCreating ())
342+ {
343+ if (mm->hasStopMessageBeenSent ())
344+ return false ;
345+ }
346+
341347 auto * runLoop = InternalRunLoop::getInstanceWithoutCreating ();
342348 if (runLoop == nullptr )
343349 return false ;
You can’t perform that action at this time.
0 commit comments