Skip to content
Permalink
Browse files

Make sure not to crash if there are no alternatives for right click

  • Loading branch information
wonder-sk committed Feb 20, 2019
1 parent aec87a0 commit 3d99fd5a04c93fab1ce12d4d9e08993537f7fbe8
Showing with 8 additions and 5 deletions.
  1. +8 −5 src/app/vertextool/qgsvertextool.cpp
@@ -968,11 +968,14 @@ void QgsVertexTool::tryToSelectFeature( QgsMapMouseEvent *e )
}
}

// move to the next alternative
if ( mSelectedFeatureAlternatives->index < mSelectedFeatureAlternatives->alternatives.count() - 1 )
++mSelectedFeatureAlternatives->index;
else
mSelectedFeatureAlternatives->index = -1;
if ( mSelectedFeatureAlternatives )
{
// move to the next alternative
if ( mSelectedFeatureAlternatives->index < mSelectedFeatureAlternatives->alternatives.count() - 1 )
++mSelectedFeatureAlternatives->index;
else
mSelectedFeatureAlternatives->index = -1;
}

if ( mSelectedFeatureAlternatives && mSelectedFeatureAlternatives->index != -1 )
{

0 comments on commit 3d99fd5

Please sign in to comment.
You can’t perform that action at this time.