Prevent crash during schematic window close

This commit is contained in:
Marek Roszko 2023-04-08 20:30:42 -04:00
parent 3077bbf1bb
commit 2025923ef4
1 changed files with 2 additions and 0 deletions

View File

@ -868,6 +868,8 @@ void SCH_EDIT_FRAME::doCloseWindow()
if( m_toolManager )
{
m_toolManager->ShutdownAllTools();
// prevent the canvas from trying to dispatch events during close
GetCanvas()->SetEventDispatcher( nullptr );
delete m_toolManager;
m_toolManager = nullptr;
}