diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-12 10:41:09 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-12 10:41:09 +0100 |
commit | 4b8133e92554582f923b0537c2d4c9e1209b1d2a (patch) | |
tree | a83f223726773c2416e06ba54be9ff2c92a45752 /LibGUI/GMenuBar.cpp | |
parent | f311d0f3537c8cdcf8ef0272754d7ead90fe1217 (diff) | |
download | serenity-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.cpp | 4 |
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) |