Skip to content
Permalink
Browse files

Do not crash after fixing invalid geometries

  • Loading branch information
m-kuhn committed Mar 18, 2019
1 parent e4d5af6 commit 4f2a78be85c9ffe5ccfd7507ef89242a038207bf
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/app/qgsgeometryvalidationmodel.cpp
@@ -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();
}

0 comments on commit 4f2a78b

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