Browse Source

Catch IO_ERROR thrown in timestamp gen

Missing nickname can throw when generating a timestamp, this should be
caught and prevent further work in the footprint loading (the entry does
not exist)

Fixes https://gitlab.com/kicad/code/kicad/issues/13029
7.0
Seth Hillbrand 3 years ago
parent
commit
1a670f4673
  1. 10
      pcbnew/footprint_info_impl.cpp

10
pcbnew/footprint_info_impl.cpp

@ -98,7 +98,15 @@ bool FOOTPRINT_LIST_IMPL::CatchErrors( const std::function<void()>& aFunc )
bool FOOTPRINT_LIST_IMPL::ReadFootprintFiles( FP_LIB_TABLE* aTable, const wxString* aNickname,
PROGRESS_REPORTER* aProgressReporter )
{
long long int generatedTimestamp = aTable->GenerateTimestamp( aNickname );
long long int generatedTimestamp = 0;
if( !CatchErrors( [&]()
{
generatedTimestamp = aTable->GenerateTimestamp( aNickname );
} ) )
{
return false;
}
if( generatedTimestamp == m_list_timestamp )
return true;

Loading…
Cancel
Save