Skip to content

Commit

Permalink
Don't crash on null geometries
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 16, 2020
1 parent b4b2ec0 commit 5f67531
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/qgsgeometryvalidator.cpp
Expand Up @@ -243,15 +243,15 @@ void QgsGeometryValidator::validatePolygon( int idx, const QgsPolygon *polygon )
void QgsGeometryValidator::run()
{
mErrorCount = 0;
if ( mGeometry.isNull() )
{
return;
}

switch ( mMethod )
{
case QgsGeometry::ValidatorGeos:
{
if ( mGeometry.isNull() )
{
return;
}

// avoid calling geos for trivial point geometries
if ( QgsWkbTypes::geometryType( mGeometry.wkbType() ) == QgsWkbTypes::PointGeometry )
{
Expand Down

0 comments on commit 5f67531

Please sign in to comment.