diff --git a/common/eda_dde.cpp b/common/eda_dde.cpp index d578f23861..8fa98c4be7 100644 --- a/common/eda_dde.cpp +++ b/common/eda_dde.cpp @@ -51,7 +51,13 @@ void KIWAY_PLAYER::CreateServer( int service, bool local ) if( local ) addr.Hostname( HOSTNAME ); - delete m_socketServer; + // this helps kill any events that could come in during deletion + if( m_socketServer ) + { + m_socketServer->Notify( false ); + delete m_socketServer; + } + m_socketServer = new wxSocketServer( addr ); m_socketServer->SetNotify( wxSOCKET_CONNECTION_FLAG );