Check KiFACE return value

Avoid segfault when cancelling initial global library setup

(Cherry-picked from 3c24017aa4)
This commit is contained in:
Lucas Dumont 2023-04-13 22:53:08 +12:00 committed by Ian McInerney
parent 8e82fee494
commit f1f69c607e
1 changed files with 3 additions and 1 deletions

View File

@ -113,7 +113,9 @@ int COMMON_CONTROL::ShowLibraryTable( const TOOL_EVENT& aEvent )
try // Sch frame was not available, try to start it
{
KIFACE* kiface = m_frame->Kiway().KiFACE( KIWAY::FACE_SCH );
kiface->CreateKiWindow( m_frame, DIALOG_SCH_LIBRARY_TABLE, &m_frame->Kiway() );
if( kiface )
kiface->CreateKiWindow( m_frame, DIALOG_SCH_LIBRARY_TABLE, &m_frame->Kiway() );
}
catch( ... )
{