mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ void Dialog::event(Core::Event& event)
|
|||
void Dialog::close()
|
||||
{
|
||||
Window::close();
|
||||
m_event_loop->quit(ExecCancel);
|
||||
done(ExecCancel);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue