Skip to content
Permalink
Browse files

dxf export: fix crash, when curve geometry can't be segmentized

(cherry picked from commit 159ad68)
  • Loading branch information
jef-n committed Dec 14, 2016
1 parent ae11e0b commit 58933aa64b042f9cfec19c0a83921bed8f96cf76
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/core/dxf/qgsdxfexport.cpp
@@ -3787,6 +3787,8 @@ void QgsDxfExport::addFeature( QgsSymbolV2RenderContext& ctx, const QgsCoordinat
case QgsWKBTypes::CircularString:
case QgsWKBTypes::CompoundCurve:
tempGeom = geom->segmentize();
if ( !tempGeom )
break;
FALLTHROUGH;
case QgsWKBTypes::LineString:
if ( !qgsDoubleNear( offset, 0.0 ) )
@@ -3805,6 +3807,8 @@ void QgsDxfExport::addFeature( QgsSymbolV2RenderContext& ctx, const QgsCoordinat

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

case QgsWKBTypes::CurvePolygon:
tempGeom = geom->segmentize();
if ( !tempGeom )
break;
FALLTHROUGH;
case QgsWKBTypes::Polygon:
{
@@ -3887,6 +3893,8 @@ void QgsDxfExport::addFeature( QgsSymbolV2RenderContext& ctx, const QgsCoordinat
{
case QgsWKBTypes::CurvePolygon:
tempGeom = tempGeom->segmentize();
if ( !tempGeom )
break;
FALLTHROUGH;
case QgsWKBTypes::Polygon:
writePolygon( tempGeom->coordinateSequence().at( 0 ), layer, "SOLID", brushColor );

0 comments on commit 58933aa

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