Handle exceptions thrown by footprint library table

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7973
This commit is contained in:
Jon Evans 2021-03-21 11:43:24 -04:00
parent 68f3d09ac1
commit e1840ccbd3
1 changed files with 10 additions and 3 deletions

View File

@ -197,10 +197,17 @@ void FP_TREE_SYNCHRONIZING_ADAPTER::GetValue( wxVariant& aVariant, wxDataViewIte
}
else if( node->m_Type == LIB_TREE_NODE::LIB )
{
const FP_LIB_TABLE_ROW* lib = GFootprintTable.FindRow( node->m_LibId.GetLibNickname() );
try
{
const FP_LIB_TABLE_ROW* lib =
GFootprintTable.FindRow( node->m_LibId.GetLibNickname() );
if( lib )
node->m_Desc = lib->GetDescr();
if( lib )
node->m_Desc = lib->GetDescr();
}
catch( IO_ERROR& )
{
}
}
aVariant = node->m_Desc;