Skip to content

Commit 58933aa

Browse files
committed
dxf export: fix crash, when curve geometry can't be segmentized
(cherry picked from commit 159ad68)
1 parent ae11e0b commit 58933aa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/core/dxf/qgsdxfexport.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -3787,6 +3787,8 @@ void QgsDxfExport::addFeature( QgsSymbolV2RenderContext& ctx, const QgsCoordinat
37873787
case QgsWKBTypes::CircularString:
37883788
case QgsWKBTypes::CompoundCurve:
37893789
tempGeom = geom->segmentize();
3790+
if ( !tempGeom )
3791+
break;
37903792
FALLTHROUGH;
37913793
case QgsWKBTypes::LineString:
37923794
if ( !qgsDoubleNear( offset, 0.0 ) )
@@ -3805,6 +3807,8 @@ void QgsDxfExport::addFeature( QgsSymbolV2RenderContext& ctx, const QgsCoordinat
38053807

38063808
case QgsWKBTypes::MultiCurve:
38073809
tempGeom = geom->segmentize();
3810+
if ( !tempGeom )
3811+
break;
38083812
FALLTHROUGH;
38093813
case QgsWKBTypes::MultiLineString:
38103814
{
@@ -3829,6 +3833,8 @@ void QgsDxfExport::addFeature( QgsSymbolV2RenderContext& ctx, const QgsCoordinat
38293833

38303834
case QgsWKBTypes::CurvePolygon:
38313835
tempGeom = geom->segmentize();
3836+
if ( !tempGeom )
3837+
break;
38323838
FALLTHROUGH;
38333839
case QgsWKBTypes::Polygon:
38343840
{
@@ -3887,6 +3893,8 @@ void QgsDxfExport::addFeature( QgsSymbolV2RenderContext& ctx, const QgsCoordinat
38873893
{
38883894
case QgsWKBTypes::CurvePolygon:
38893895
tempGeom = tempGeom->segmentize();
3896+
if ( !tempGeom )
3897+
break;
38903898
FALLTHROUGH;
38913899
case QgsWKBTypes::Polygon:
38923900
writePolygon( tempGeom->coordinateSequence().at( 0 ), layer, "SOLID", brushColor );

0 commit comments

Comments
 (0)