Check KiFACE return value

Avoid segfault when cancelling initial global library setup
This commit is contained in:
Lucas Dumont 2023-04-13 22:53:08 +12:00
parent df5456bb5b
commit 3c24017aa4
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( ... )
{