From 5e530f02262d9e8b378c123579be149db231f922 Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Thu, 26 Oct 2006 16:49:39 +0000 Subject: [PATCH] Minor corrections git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/ipc/client.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/ipc/client.cpp b/samples/ipc/client.cpp index c405fce062..09ec3059fa 100644 --- a/samples/ipc/client.cpp +++ b/samples/ipc/client.cpp @@ -218,7 +218,7 @@ void MyFrame::EnableControls() GetHostname()->Enable(m_client == NULL); GetTopic()->Enable(m_client == NULL); - const bool isConnected = m_client->IsConnected(); + const bool isConnected = (m_client != NULL && m_client->IsConnected()); GetDisconnect()->Enable(m_client != NULL && isConnected); GetStartAdvise()->Enable(m_client != NULL && isConnected); GetStopAdvise()->Enable(m_client != NULL && isConnected); @@ -261,7 +261,7 @@ void MyFrame::OnStart(wxCommandEvent& WXUNUSED(event)) delete m_client; m_client = NULL; } - Enable(); + EnableControls(); } void MyFrame::OnServername( wxCommandEvent& WXUNUSED(event) ) @@ -315,7 +315,7 @@ void MyFrame::Disconnect() { delete m_client; m_client = NULL; - Enable(); + EnableControls(); } void MyFrame::OnStartAdvise(wxCommandEvent& WXUNUSED(event)) @@ -399,7 +399,7 @@ void MyClient::Disconnect() m_connection->Disconnect(); delete m_connection; m_connection = NULL; - wxGetApp().GetFrame()->Enable(); + wxGetApp().GetFrame()->EnableControls(); wxLogMessage(_T("Client disconnected from server")); } }