Skip to content
Permalink
Browse files

Ignore invalid polygon geometries to avoid crashes in tessellation

  • Loading branch information
wonder-sk committed Aug 14, 2017
1 parent 33f7c17 commit 35b37a228f66cacdf0ce30ce24e70e9fe391450a
Showing with 7 additions and 0 deletions.
  1. +7 −0 src/3d/polygonentity.cpp
@@ -102,6 +102,13 @@ Qt3DRender::QGeometryRenderer *PolygonEntityNode::renderer( const Map3D &map, co
if ( QgsWkbTypes::isCurvedType( geom.geometry()->wkbType() ) )
geom = QgsGeometry( geom.geometry()->segmentize() );

if ( !geom.isGeosValid() )
{
// invalid geometries break tessellation
qDebug() << "skipping invalid geometry" << f.id();
continue;
}

QgsAbstractGeometry *g = geom.geometry();

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

0 comments on commit 35b37a2

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