Skip to content

Commit

Permalink
Fix crash when trying to render polygon with no exterior ring
Browse files Browse the repository at this point in the history
Should only occur with very badly corrupted layers, but we
shouldn't crash in this case
  • Loading branch information
nyalldawson committed Nov 7, 2016
1 parent d783c73 commit 54522fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/symbology-ng/qgssymbol.cpp
Expand Up @@ -767,6 +767,11 @@ void QgsSymbol::renderFeature( const QgsFeature& feature, QgsRenderContext& cont
break;
}
const QgsPolygonV2& polygon = dynamic_cast<const QgsPolygonV2&>( *segmentizedGeometry.geometry() );
if ( !polygon.exteriorRing() )
{
QgsDebugMsg( "cannot render polygon with no exterior ring" );
break;
}
_getPolygon( pts, holes, context, polygon, !tileMapRendering && clipFeaturesToExtent() );
static_cast<QgsFillSymbol*>( this )->renderPolygon( pts, ( !holes.isEmpty() ? &holes : nullptr ), &feature, context, layer, selected );

Expand Down

0 comments on commit 54522fd

Please sign in to comment.