X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c59aa14a6c1f23ddcd34822443483332a5ee81c3..6f3f38980f10a935f3b47dbf0d3b4643e96a4be2:/src/univ/menu.cpp diff --git a/src/univ/menu.cpp b/src/univ/menu.cpp index 571761f561..c60c14702e 100644 --- a/src/univ/menu.cpp +++ b/src/univ/menu.cpp @@ -1096,11 +1096,7 @@ const wxMenuGeometryInfo& wxMenu::GetGeometryInfo() const void wxMenu::InvalidateGeometryInfo() { - if ( m_geometry ) - { - delete m_geometry; - m_geometry = NULL; - } + wxDELETE(m_geometry); } // ---------------------------------------------------------------------------- @@ -2513,8 +2509,7 @@ bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y) ms_evtLoopPopup = new wxEventLoop; ms_evtLoopPopup->Run(); - delete ms_evtLoopPopup; - ms_evtLoopPopup = NULL; + wxDELETE(ms_evtLoopPopup); // remove the handler PopEventHandler(true /* delete it */);