summaryrefslogtreecommitdiff
path: root/LibGUI/GMenuBar.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-02-12 10:41:09 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-02-12 10:41:09 +0100
commit4b8133e92554582f923b0537c2d4c9e1209b1d2a (patch)
treea83f223726773c2416e06ba54be9ff2c92a45752 /LibGUI/GMenuBar.cpp
parentf311d0f3537c8cdcf8ef0272754d7ead90fe1217 (diff)
downloadserenity-4b8133e92554582f923b0537c2d4c9e1209b1d2a.zip
WindowServer: Clean up any menu objects on process exit.
..and now that this works, implement the Quit menu action in Terminal. :^)
Diffstat (limited to 'LibGUI/GMenuBar.cpp')
-rw-r--r--LibGUI/GMenuBar.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/LibGUI/GMenuBar.cpp b/LibGUI/GMenuBar.cpp
index 25381e77cd..18c08f1a62 100644
--- a/LibGUI/GMenuBar.cpp
+++ b/LibGUI/GMenuBar.cpp
@@ -7,6 +7,10 @@ GMenuBar::GMenuBar()
GMenuBar::~GMenuBar()
{
+ if (m_menubar_id) {
+ gui_menubar_destroy(m_menubar_id);
+ m_menubar_id = 0;
+ }
}
void GMenuBar::add_menu(OwnPtr<GMenu>&& menu)