mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-26 00:02:08 -05:00
Ignore invalid polygon geometries to avoid crashes in tessellation
This commit is contained in:
parent
33f7c17740
commit
35b37a228f
@ -102,6 +102,13 @@ Qt3DRender::QGeometryRenderer *PolygonEntityNode::renderer( const Map3D &map, co
|
|||||||
if ( QgsWkbTypes::isCurvedType( geom.geometry()->wkbType() ) )
|
if ( QgsWkbTypes::isCurvedType( geom.geometry()->wkbType() ) )
|
||||||
geom = QgsGeometry( geom.geometry()->segmentize() );
|
geom = QgsGeometry( geom.geometry()->segmentize() );
|
||||||
|
|
||||||
|
if ( !geom.isGeosValid() )
|
||||||
|
{
|
||||||
|
// invalid geometries break tessellation
|
||||||
|
qDebug() << "skipping invalid geometry" << f.id();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
QgsAbstractGeometry *g = geom.geometry();
|
QgsAbstractGeometry *g = geom.geometry();
|
||||||
|
|
||||||
if ( QgsWkbTypes::flatType( g->wkbType() ) == QgsWkbTypes::Polygon )
|
if ( QgsWkbTypes::flatType( g->wkbType() ) == QgsWkbTypes::Polygon )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user