Eeschema: fix broken library symbol link for missing libraries.
When an attempt to resolve a library symbol link having a library nickname that was no longer found in the symbol library table, the symbol resolution was not falling back to the cache library due to a silently handled exception. Add check for valid symbol library table nickname before attempting to resolve symbol link to prevent exception bypassing falling back to the cache library. Fixes lp:1740609 https://bugs.launchpad.net/kicad/+bug/1740609
This commit is contained in:
parent
fb597f4298
commit
03e9f0c94a
|
@ -321,7 +321,10 @@ bool SCH_COMPONENT::Resolve( SYMBOL_LIB_TABLE& aLibTable, PART_LIB* aCacheLib )
|
|||
|
||||
try
|
||||
{
|
||||
if( m_lib_id.IsValid() )
|
||||
// LIB_TABLE_BASE::LoadSymbol() throws an IO_ERROR if the the library nickname
|
||||
// is not found in the table so check if the library still exists in the table
|
||||
// before attempting to load the symbol.
|
||||
if( m_lib_id.IsValid() && aLibTable.HasLibrary( m_lib_id.GetLibNickname() ) )
|
||||
alias = aLibTable.LoadSymbol( m_lib_id );
|
||||
|
||||
// Fall back to cache library. This is temporary until the new schematic file
|
||||
|
|
Loading…
Reference in New Issue