X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e536b75069b5caa8333c5609bfe05b68ba2b5653..cc699de848bcead97528901420ee975df1b9442a:/samples/ipc/server.cpp diff --git a/samples/ipc/server.cpp b/samples/ipc/server.cpp index 4bd26352a2..47b2d62ee6 100644 --- a/samples/ipc/server.cpp +++ b/samples/ipc/server.cpp @@ -32,7 +32,7 @@ // we're using TCP/IP or real DDE. #include "ipcsetup.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" #endif @@ -160,11 +160,7 @@ void MyFrame::UpdateUI() void MyFrame::OnClose(wxCloseEvent& event) { - if (m_server) - { - delete m_server; - m_server = NULL; - } + wxDELETE(m_server); event.Skip(); } @@ -185,8 +181,7 @@ void MyFrame::OnStart(wxCommandEvent& WXUNUSED(event)) else { wxLogMessage("Server %s failed to start", servername); - delete m_server; - m_server = NULL; + wxDELETE(m_server); } UpdateUI(); } @@ -262,8 +257,7 @@ void MyServer::Disconnect() { if ( m_connection ) { - delete m_connection; - m_connection = NULL; + wxDELETE(m_connection); wxGetApp().GetFrame()->UpdateUI(); wxLogMessage("Disconnected client"); }