X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/975dd469bab7c0ca1d0b6c5c25e0396b27f2fb54..89b799cccff2a3cfa5d51dac5c6e9153d2fe2e82:/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