X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/29c7962a9f3189ba92440c2d8b2dbc8cb7f69e73..63ced01b228ba426db163b75667a9b57d092f8db:/src/common/framecmn.cpp diff --git a/src/common/framecmn.cpp b/src/common/framecmn.cpp index 916c0ea76d..e888407f92 100644 --- a/src/common/framecmn.cpp +++ b/src/common/framecmn.cpp @@ -92,27 +92,15 @@ wxFrame *wxFrameBase::New(wxWindow *parent, void wxFrameBase::DeleteAllBars() { #if wxUSE_MENUS - if ( m_frameMenuBar ) - { - delete m_frameMenuBar; - m_frameMenuBar = NULL; - } + wxDELETE(m_frameMenuBar); #endif // wxUSE_MENUS #if wxUSE_STATUSBAR - if ( m_frameStatusBar ) - { - delete m_frameStatusBar; - m_frameStatusBar = NULL; - } + wxDELETE(m_frameStatusBar); #endif // wxUSE_STATUSBAR #if wxUSE_TOOLBAR - if ( m_frameToolBar ) - { - delete m_frameToolBar; - m_frameToolBar = NULL; - } + wxDELETE(m_frameToolBar); #endif // wxUSE_TOOLBAR }