From 92de5a571a746672dc9413d4f9ebf7c08b049191 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 8 Apr 2005 18:26:02 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=5806 --- clientgui/MainDocument.cpp | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/clientgui/MainDocument.cpp b/clientgui/MainDocument.cpp index 656d5e5465..e40ec05452 100644 --- a/clientgui/MainDocument.cpp +++ b/clientgui/MainDocument.cpp @@ -142,15 +142,16 @@ wxInt32 CNetworkConnectionThread::SetNewComputerPassword( const wxChar* szPasswo void CNetworkConnectionThread::SetStateError() { CMainFrame* pFrame = wxGetApp().GetFrame(); - wxASSERT(wxDynamicCast(pFrame, CMainFrame)); - m_bConnected = false; - m_bReconnecting = false; - m_bReconnectOnError = false; + if (wxDynamicCast(pFrame, CMainFrame)) { + m_bConnected = false; + m_bReconnecting = false; + m_bReconnectOnError = false; - m_bConnectEvent = false; + m_bConnectEvent = false; - pFrame->FireConnectError(); + pFrame->FireConnectError(); + } } @@ -164,19 +165,20 @@ void CNetworkConnectionThread::SetStateReconnecting() { void CNetworkConnectionThread::SetStateSuccess( std::string& strComputer, std::string& strComputerPassword ) { CMainFrame* pFrame = wxGetApp().GetFrame(); - wxASSERT(wxDynamicCast(pFrame, CMainFrame)); - m_bConnected = true; - m_bReconnecting = false; - m_bReconnectOnError = true; - m_strConnectedComputerName = strComputer.c_str(); - m_strConnectedComputerPassword = strComputerPassword.c_str(); - m_strNewComputerName = wxEmptyString; - m_strNewComputerPassword = wxEmptyString; + if (wxDynamicCast(pFrame, CMainFrame)) { + m_bConnected = true; + m_bReconnecting = false; + m_bReconnectOnError = true; + m_strConnectedComputerName = strComputer.c_str(); + m_strConnectedComputerPassword = strComputerPassword.c_str(); + m_strNewComputerName = wxEmptyString; + m_strNewComputerPassword = wxEmptyString; - m_bConnectEvent = false; + m_bConnectEvent = false; - pFrame->FireConnect(); + pFrame->FireConnect(); + } }