1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 06:44:57 +00:00

GDialog: Remove self from parent when the nested event loop returns

This ensures that we close (and don't leak) the dialog during the
typical usage pattern.
This commit is contained in:
Andreas Kling 2019-09-22 00:46:29 +02:00
parent e61aa01745
commit bd1e8bf166

View file

@ -29,6 +29,7 @@ int GDialog::exec()
auto result = m_event_loop->exec();
m_event_loop = nullptr;
dbgprintf("%s: event loop returned with result %d\n", class_name(), result);
remove_from_parent();
return result;
}