From da96c151ab8092e425be9a29c658f615f35271ed Mon Sep 17 00:00:00 2001 From: Peter Elliott Date: Tue, 11 Jul 2023 16:56:28 -0600 Subject: [PATCH] LibCore: Exit EventLoop::spin_until() when exit requested This keeps WebContent from staying open if it's spinning forever trying to load a page. --- Userland/Libraries/LibCore/EventLoop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); }