Coverity issue fix.

This commit is contained in:
Wayne Stambaugh 2021-11-15 14:02:28 -05:00
parent 12a75ffb94
commit a4e9beeeac
1 changed files with 11 additions and 1 deletions

View File

@ -304,7 +304,17 @@ void PCB_BASE_FRAME::FocusOnItem( BOARD_ITEM* aItem, PCB_LAYER_ID aLayer )
switch( aItem->Type() ) switch( aItem->Type() )
{ {
case PCB_FOOTPRINT_T: case PCB_FOOTPRINT_T:
try
{
itemPoly = static_cast<FOOTPRINT*>( aItem )->GetBoundingHull(); itemPoly = static_cast<FOOTPRINT*>( aItem )->GetBoundingHull();
}
catch( const ClipperLib::clipperException& exc )
{
// This may be overkill and could be an assertion but we are more likely to find
// any clipper errors this way.
wxLogError( wxT( "Clipper library exception '%s' occurred." ), exc.what() );
}
break; break;
case PCB_PAD_T: case PCB_PAD_T: