]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/mdi.h
Allow using wxGraphicsContext with MinGW if gdiplus.h is available.
[wxWidgets.git] / include / wx / mdi.h
index e11290ead98b540577d5b0bd3dd01b2628d397b1..37f0fa5208677d9605435a08d77c46a56c7ecb9b 100644 (file)
@@ -17,6 +17,7 @@
 #if wxUSE_MDI
 
 #include "wx/frame.h"
+#include "wx/menu.h"
 
 // forward declarations
 class WXDLLIMPEXP_FWD_CORE wxMDIParentFrame;
@@ -87,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