diff --git a/ircDDBGateway/IRCDDBGatewayApp.cpp b/ircDDBGateway/IRCDDBGatewayApp.cpp index 3b03695..1101563 100644 --- a/ircDDBGateway/IRCDDBGatewayApp.cpp +++ b/ircDDBGateway/IRCDDBGatewayApp.cpp @@ -171,8 +171,10 @@ int CIRCDDBGatewayApp::OnExit() wxLogInfo(APPLICATION_NAME + wxT(" is exiting")); - //m_thread->kill(); - wxGetApp().GetTopWindow()->Close(); + m_thread->kill(); + wxWindow * topWin = wxGetApp().GetTopWindow(); + if (topWin != NULL) + topWin->Close(); delete m_config;