Explorar o código

LibCore: Exit EventLoop::spin_until() when exit requested

This keeps WebContent from staying open if it's spinning forever trying
to load a page.
Peter Elliott %!s(int64=2) %!d(string=hai) anos
pai
achega
da96c151ab
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Userland/Libraries/LibCore/EventLoop.cpp

+ 1 - 1
Userland/Libraries/LibCore/EventLoop.cpp

@@ -78,7 +78,7 @@ int EventLoop::exec()
 void EventLoop::spin_until(Function<bool()> goal_condition)
 {
     EventLoopPusher pusher(*this);
-    while (!goal_condition())
+    while (!m_impl->was_exit_requested() && !goal_condition())
         pump();
 }