Skip to content
Permalink
Browse files

Add safety check to QgsGeometry::asPolygon. Fixes possible crash

  • Loading branch information
m-kuhn committed Feb 4, 2016
1 parent 768f0e8 commit 0add85802069205faf4fd5d421ee94cbdddf7f76
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/core/geometry/qgsgeometry.cpp
@@ -1034,6 +1034,9 @@ QgsPolyline QgsGeometry::asPolyline() const

QgsPolygon QgsGeometry::asPolygon() const
{
if ( !d->geometry )
return QgsPolygon();

bool doSegmentation = ( d->geometry->geometryType() == "CurvePolygon" );

QgsPolygonV2* p = nullptr;

0 comments on commit 0add858

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