X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/975dd469bab7c0ca1d0b6c5c25e0396b27f2fb54..eafdb19c44154550b3c6155a62642e7ab5c6e64d:/include/wx/mdi.h 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