Skip to content
Permalink
Browse files

Guard against nullptr

  • Loading branch information
m-kuhn committed Jan 20, 2019
1 parent 0b248dc commit ab4b38ce0f5b9449ca10b4da67f3c4299d38c64f
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/analysis/processing/qgsalgorithmpolygonstolines.cpp
@@ -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() );

0 comments on commit ab4b38c

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