From f7bf375bea5740897651aceef9e26c39e957aabc Mon Sep 17 00:00:00 2001 From: Geoffrey Merck F4FXL - KC3FRA Date: Fri, 19 Apr 2019 08:27:47 +0200 Subject: [PATCH] Fix segmentaton fault on exit --- ircDDBGateway/IRCDDBGatewayApp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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;