Skip to content

Commit

Permalink
Guard against nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jan 20, 2019
1 parent 0b248dc commit ab4b38c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/analysis/processing/qgsalgorithmpolygonstolines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ QList<QgsCurve *> QgsPolygonsToLinesAlgorithm::extractRings( const QgsAbstractGe
}
else if ( QgsCurvePolygon *polygon = qgsgeometry_cast<QgsCurvePolygon *>( geom ) )
{
rings.append( polygon->exteriorRing()->clone() );
if ( auto exteriorRing = polygon->exteriorRing() )
rings.append( exteriorRing->clone() );
for ( int i = 0; i < polygon->numInteriorRings(); ++i )
{
rings.append( polygon->interiorRing( i )->clone() );
Expand Down

0 comments on commit ab4b38c

Please sign in to comment.