diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibCore/EventLoop.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCore/EventLoop.cpp b/Userland/Libraries/LibCore/EventLoop.cpp index fafd7aaae3..d6a5a95ac6 100644 --- a/Userland/Libraries/LibCore/EventLoop.cpp +++ b/Userland/Libraries/LibCore/EventLoop.cpp @@ -293,6 +293,11 @@ EventLoop::EventLoop([[maybe_unused]] MakeInspectable make_inspectable) EventLoop::~EventLoop() { + // NOTE: Pop the main event loop off of the stack when destroyed. + if (this == s_main_event_loop) { + s_event_loop_stack->take_last(); + s_main_event_loop = nullptr; + } } bool connect_to_inspector_server() |