mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-06 02:55:49 +03:00
LibGUI: Check if event loop is alive before quitting it in Dialog::close
Previously we would quit the event loop of a dialog without checking if
it is still alive in the Window::close overload. This patch updates the
implementation to make use of the existing done method, handling closes
more gracefully.
This fixes a CommandPalette crashing when opening an about dialog, as
since 1074c399f3
the command palette
dialog would handle a WindowBecameInactive event after closing itself
due to the action already being called.
This commit is contained in:
parent
cd3e337487
commit
64c66e26f5
Notes:
sideshowbarker
2024-07-17 11:31:28 +09:00
Author: https://github.com/networkException Commit: https://github.com/SerenityOS/serenity/commit/64c66e26f5 Pull-request: https://github.com/SerenityOS/serenity/pull/13812
@ -116,7 +116,7 @@ void Dialog::event(Core::Event& event)
|
||||
void Dialog::close()
|
||||
{
|
||||
Window::close();
|
||||
m_event_loop->quit(ExecCancel);
|
||||
done(ExecCancel);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user