Browse Source

Avoid deref on missing part

We do not always have the LIB_SYMBOL set in a SCH_SYMBOL, so avoid
trying to get the embedded files from it

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20986
pull/18/head
Seth Hillbrand 5 months ago
parent
commit
9d32de5154
  1. 4
      eeschema/sch_symbol.cpp

4
eeschema/sch_symbol.cpp

@ -1315,7 +1315,9 @@ bool SCH_SYMBOL::ResolveTextVar( const SCH_SHEET_PATH* aPath, wxString* token, i
std::vector<EMBEDDED_FILES*> embeddedFilesStack;
embeddedFilesStack.push_back( schematic->GetEmbeddedFiles() );
embeddedFilesStack.push_back( GetLibSymbolRef()->GetEmbeddedFiles() );
if( m_part )
embeddedFilesStack.push_back( m_part->GetEmbeddedFiles() );
simLibMgr.SetFilesStack( embeddedFilesStack );

Loading…
Cancel
Save