]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/mdi.h
Generate code using IsOk() instead of Ok() in stc.cpp.
[wxWidgets.git] / 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