Fix not handled exception, creating a crash.
Fixes #12536 https://gitlab.com/kicad/code/kicad/issues/12536
This commit is contained in:
parent
46b0c116cd
commit
b5dfa4e2fb
|
@ -429,10 +429,18 @@ MODEL_VALIDATE_ERRORS PANEL_FP_PROPERTIES_3D_MODEL::validateModelExists( const w
|
||||||
return MODEL_VALIDATE_ERRORS::ILLEGAL_FILENAME;
|
return MODEL_VALIDATE_ERRORS::ILLEGAL_FILENAME;
|
||||||
|
|
||||||
wxString libraryName = m_footprint->GetFPID().GetLibNickname();
|
wxString libraryName = m_footprint->GetFPID().GetLibNickname();
|
||||||
const FP_LIB_TABLE_ROW* fpRow =
|
const FP_LIB_TABLE_ROW* fpRow = nullptr;
|
||||||
m_frame->Prj().PcbFootprintLibs()->FindRow( libraryName, false );
|
try
|
||||||
|
{
|
||||||
|
fpRow = m_frame->Prj().PcbFootprintLibs()->FindRow( libraryName, false );
|
||||||
|
}
|
||||||
|
catch( ... )
|
||||||
|
{
|
||||||
|
// if libraryName is not found in table, do nothing
|
||||||
|
}
|
||||||
|
|
||||||
wxString footprintBasePath = wxEmptyString;
|
wxString footprintBasePath = wxEmptyString;
|
||||||
|
|
||||||
if( fpRow )
|
if( fpRow )
|
||||||
footprintBasePath = fpRow->GetFullURI( true );
|
footprintBasePath = fpRow->GetFullURI( true );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue