diff --git a/common/eda_shape.cpp b/common/eda_shape.cpp index a0a25a8d91..3fb784642d 100644 --- a/common/eda_shape.cpp +++ b/common/eda_shape.cpp @@ -1736,7 +1736,17 @@ static struct EDA_SHAPE_DESC filled->SetAvailableFunc( [=]( INSPECTABLE* aItem ) -> bool { - SHAPE_T itemShape = aItem->Get( shape ); + SHAPE_T itemShape; + + try + { + itemShape = aItem->Get( shape ); + } + catch( std::runtime_error& err ) + { + wxFAIL_MSG( err.what() ); + return false; + } switch( itemShape ) {