Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix potential crash in QgsGeometry::smooth
  • Loading branch information
nyalldawson committed Sep 25, 2017
1 parent 20cc7a7 commit 60f81bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeometry.cpp
Expand Up @@ -2669,7 +2669,7 @@ bool QgsGeometry::compare( const QgsMultiPolygon &p1, const QgsMultiPolygon &p2,

QgsGeometry QgsGeometry::smooth( const unsigned int iterations, const double offset, double minimumDistance, double maxAngle ) const
{
if ( d->geometry->isEmpty() )
if ( !d->geometry || d->geometry->isEmpty() )
return QgsGeometry();

QgsGeometry geom = *this;
Expand Down

0 comments on commit 60f81bd

Please sign in to comment.