Skip to content

Commit

Permalink
Do not crash after fixing invalid geometries
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Mar 20, 2019
1 parent e4d5af6 commit 4f2a78b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/app/qgsgeometryvalidationmodel.cpp
Expand Up @@ -193,12 +193,18 @@ QVariant QgsGeometryValidationModel::data( const QModelIndex &index, int role )

case ErrorLocationGeometryRole:
{
if ( featureItem.errors.empty() )
return QVariant();

QgsSingleGeometryCheckError *error = featureItem.errors.first().get();
return error->errorLocation();
}

case ProblemExtentRole:
{
if ( featureItem.errors.empty() )
return QVariant();

QgsSingleGeometryCheckError *error = featureItem.errors.first().get();
return error->errorLocation().boundingBox();
}
Expand Down

0 comments on commit 4f2a78b

Please sign in to comment.