Coverity fixes.

This commit is contained in:
Wayne Stambaugh 2021-10-19 07:42:27 -04:00
parent fb5fef9f5f
commit 1e1da55840
2 changed files with 13 additions and 3 deletions

View File

@ -879,7 +879,17 @@ void EDA_DRAW_FRAME::FocusOnLocation( const wxPoint& aPos )
}
if( centerView )
GetCanvas()->GetView()->SetCenter( aPos, dialogScreenRects );
{
try
{
GetCanvas()->GetView()->SetCenter( aPos, dialogScreenRects );
}
catch( const ClipperLib::clipperException& exc )
{
wxLogError( wxT( "Clipper library error '%s' occurred centering object." ),
exc.what() );
}
}
GetCanvas()->GetViewControls()->SetCrossHairCursorPosition( aPos );
}

View File

@ -115,8 +115,8 @@ void LIB_SHAPE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
wxPoint start = aTransform.TransformCoordinate( m_start ) + aOffset;
wxPoint end = aTransform.TransformCoordinate( m_end ) + aOffset;
wxPoint center;
int startAngle;
int endAngle;
int startAngle = 0;
int endAngle = 0;
int pen_size = GetEffectivePenWidth( aPlotter->RenderSettings() );
FILL_T fill = aFill ? m_fill : FILL_T::NO_FILL;