Skip to content

Commit

Permalink
Avoid crash with invalid indx
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 15, 2018
1 parent df11d7f commit d0728ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/qgsgeometryvalidationdock.cpp
Expand Up @@ -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 )
Expand Down

0 comments on commit d0728ef

Please sign in to comment.