Skip to content
Permalink
Browse files

Fix crash when trying to render polygon with no exterior ring

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 54522fd590b3ad15e84303801bfde3e9c1fe3bb6
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/core/symbology-ng/qgssymbol.cpp
@@ -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 );

0 comments on commit 54522fd

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