X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3cb332c1553bb977cb8db16c19c733684ef72805..33e478497fa5b722a3d84dca2ccffb10ce181910:/samples/dialogs/dialogs.cpp diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index 941ce02b02..1d15d80848 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -7,7 +7,7 @@ // Copyright: (c) Julian Smart // (c) 2004 ABX // (c) Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// // For compilers that support precompilation, includes "wx/wx.h". @@ -1949,8 +1949,7 @@ void MyFrame::ShowReplaceDialog( wxCommandEvent& WXUNUSED(event) ) { if ( m_dlgReplace ) { - delete m_dlgReplace; - m_dlgReplace = NULL; + wxDELETE(m_dlgReplace); } else { @@ -1970,8 +1969,7 @@ void MyFrame::ShowFindDialog( wxCommandEvent& WXUNUSED(event) ) { if ( m_dlgFind ) { - delete m_dlgFind; - m_dlgFind = NULL; + wxDELETE(m_dlgFind); } else { @@ -2147,9 +2145,7 @@ void MyModalDialog::OnButton(wxCommandEvent& event) { if ( event.GetEventObject() == m_btnDelete ) { - delete m_btnModal; - m_btnModal = NULL; - + wxDELETE(m_btnModal); m_btnDelete->Disable(); } else if ( event.GetEventObject() == m_btnModal )