From: Vadim Zeitlin Date: Tue, 27 Jan 2009 14:48:20 +0000 (+0000) Subject: don't do anything in SetWindowMenu() if we're setting the same menu as we already... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/74c34d22773e39b13fe0502798494b38f261a9e5?ds=inline 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 --- 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