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