diff --git a/Userland/Libraries/LibCore/EventLoop.cpp b/Userland/Libraries/LibCore/EventLoop.cpp index 2d1a0a657d..5a37979efd 100644 --- a/Userland/Libraries/LibCore/EventLoop.cpp +++ b/Userland/Libraries/LibCore/EventLoop.cpp @@ -78,7 +78,7 @@ int EventLoop::exec() void EventLoop::spin_until(Function goal_condition) { EventLoopPusher pusher(*this); - while (!goal_condition()) + while (!m_impl->was_exit_requested() && !goal_condition()) pump(); }