diff options
author | Tom <tomut@yahoo.com> | 2020-07-13 19:14:30 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-15 00:11:30 +0200 |
commit | 8ae37bccf1310652aa5318af9ccad6e4bdea4494 (patch) | |
tree | 9e436aa44ff4841b5e84346075148c284f8cb94c | |
parent | 50903fd88c14ae8d00a8f16c15364a2c92a0db81 (diff) | |
download | serenity-8ae37bccf1310652aa5318af9ccad6e4bdea4494.zip |
LibGUI: Fix menu leak when default action changed
-rw-r--r-- | Libraries/LibGUI/Menu.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibGUI/Menu.cpp b/Libraries/LibGUI/Menu.cpp index 77623dd267..c48ade5d75 100644 --- a/Libraries/LibGUI/Menu.cpp +++ b/Libraries/LibGUI/Menu.cpp @@ -104,6 +104,7 @@ void Menu::dismiss() int Menu::realize_menu(RefPtr<Action> default_action) { + unrealize_menu(); m_menu_id = WindowServerConnection::the().send_sync<Messages::WindowServer::CreateMenu>(m_name)->menu_id(); #ifdef MENU_DEBUG |