From 4b8133e92554582f923b0537c2d4c9e1209b1d2a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 12 Feb 2019 10:41:09 +0100 Subject: WindowServer: Clean up any menu objects on process exit. ..and now that this works, implement the Quit menu action in Terminal. :^) --- LibGUI/GMenuBar.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'LibGUI/GMenuBar.cpp') 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&& menu) -- cgit v1.2.3