Skip to content

Commit 35b37a2

Browse files
committedSep 15, 2017
Ignore invalid polygon geometries to avoid crashes in tessellation
1 parent 33f7c17 commit 35b37a2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎src/3d/polygonentity.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,13 @@ Qt3DRender::QGeometryRenderer *PolygonEntityNode::renderer( const Map3D &map, co
102102
if ( QgsWkbTypes::isCurvedType( geom.geometry()->wkbType() ) )
103103
geom = QgsGeometry( geom.geometry()->segmentize() );
104104

105+
if ( !geom.isGeosValid() )
106+
{
107+
// invalid geometries break tessellation
108+
qDebug() << "skipping invalid geometry" << f.id();
109+
continue;
110+
}
111+
105112
QgsAbstractGeometry *g = geom.geometry();
106113

107114
if ( QgsWkbTypes::flatType( g->wkbType() ) == QgsWkbTypes::Polygon )

0 commit comments

Comments
 (0)
Please sign in to comment.