From 74c34d22773e39b13fe0502798494b38f261a9e5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 27 Jan 2009 14:48:20 +0000 Subject: [PATCH] don't do anything in SetWindowMenu() if we're setting the same menu as we already have git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mdi.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/wx/mdi.h b/include/wx/mdi.h index 2a7bbc2cfa..37f0fa5208 100644 --- a/include/wx/mdi.h +++ b/include/wx/mdi.h @@ -88,8 +88,11 @@ public: // menu can be NULL to disable the window menu completely virtual void SetWindowMenu(wxMenu *menu) { - delete m_windowMenu; - m_windowMenu = menu; + if ( menu != m_windowMenu ) + { + delete m_windowMenu; + m_windowMenu = menu; + } } #endif // wxUSE_MENUS -- 2.45.2