Skip to content
Permalink
Browse files

Avoid crash with invalid indx

  • Loading branch information
m-kuhn committed Oct 3, 2018
1 parent df11d7f commit d0728ef7a38e6acdf579c6a49cbf13003540b9b2
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/app/qgsgeometryvalidationdock.cpp
@@ -160,7 +160,10 @@ void QgsGeometryValidationDock::updateCurrentError()

QModelIndex QgsGeometryValidationDock::currentIndex() const
{
return mErrorListView->selectionModel()->currentIndex();
if ( !mGeometryValidationModel->rowCount() )
return QModelIndex();
else
return mErrorListView->selectionModel()->currentIndex();
}

void QgsGeometryValidationDock::onCurrentErrorChanged( const QModelIndex &current, const QModelIndex &previous )

0 comments on commit d0728ef

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