Don't crash when symbol editor frame can't load.

This commit is contained in:
Alex Shvartzkop 2023-08-07 17:19:37 +03:00
parent 30eae5d896
commit 713d4fc593
1 changed files with 4 additions and 0 deletions

View File

@ -1787,6 +1787,8 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
auto editor = (SYMBOL_EDIT_FRAME*) m_frame->Kiway().Player( FRAME_SCH_SYMBOL_EDITOR,
true );
wxCHECK( editor, 0 );
if( wxWindow* blocking_win = editor->Kiway().GetBlockingDialog() )
blocking_win->Close( true );
@ -1804,6 +1806,8 @@ int SCH_EDIT_TOOL::Properties( const TOOL_EVENT& aEvent )
auto editor = (SYMBOL_EDIT_FRAME*) m_frame->Kiway().Player( FRAME_SCH_SYMBOL_EDITOR,
true );
wxCHECK( editor, 0 );
if( wxWindow* blocking_win = editor->Kiway().GetBlockingDialog() )
blocking_win->Close( true );