]> git.saurik.com Git - wxWidgets.git/commitdiff
don't do anything in SetWindowMenu() if we're setting the same menu as we already...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 27 Jan 2009 14:48:20 +0000 (14:48 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 27 Jan 2009 14:48:20 +0000 (14:48 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/mdi.h

index 2a7bbc2cfa4391b9ff64c7e1f3803a5353a884ed..37f0fa5208677d9605435a08d77c46a56c7ecb9b 100644 (file)
@@ -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