Browse Source

Fix crash in symbol editor GetlibraryNames

GetLibrary is allowed to return null, so we need to check before
dereferencing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19236
8.0
Seth Hillbrand 11 months ago
parent
commit
5552d63f70
  1. 4
      eeschema/symbol_library_manager.cpp

4
eeschema/symbol_library_manager.cpp

@ -137,7 +137,9 @@ wxArrayString SYMBOL_LIBRARY_MANAGER::GetLibraryNames() const
for( const wxString& libName : symTable()->GetLogicalLibs() )
{
// Database libraries are hidden from the symbol editor at the moment
if( GetLibrary( libName )->SchLibType() == SCH_IO_MGR::SCH_DATABASE )
SYMBOL_LIB_TABLE_ROW* row = GetLibrary( libName );
if( !row || row->SchLibType() == SCH_IO_MGR::SCH_DATABASE )
continue;
res.Add( libName );

Loading…
Cancel
Save