Skip to content
Permalink
Browse files

Do not crash after fixing invalid geometries

  • Loading branch information
m-kuhn committed Mar 18, 2019
1 parent bd44dce commit 5f4308cda013fc0c3459a440a6f0da58dd7dd310
Showing with 6 additions and 0 deletions.
  1. +6 −0 src/app/qgsgeometryvalidationmodel.cpp
@@ -191,12 +191,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 5f4308c

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