Safety check suggested by Coverity

This commit is contained in:
Jon Evans 2021-04-12 20:42:50 -04:00
parent 2aa5e568e8
commit 311cde0984
1 changed files with 2 additions and 0 deletions

View File

@ -613,6 +613,8 @@ void LINE::dragCornerFree( const VECTOR2I& aP, int aIndex )
void LINE::DragCorner( const VECTOR2I& aP, int aIndex, bool aFreeAngle )
{
wxCHECK_RET( aIndex >= 0, "Negative index passed to LINE::DragCorner" );
if( aFreeAngle )
{
dragCornerFree( aP, aIndex );