Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 58933aa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/dxf/qgsdxfexport.cpp
Expand Up @@ -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 ) )
Expand All @@ -3805,6 +3807,8 @@ void QgsDxfExport::addFeature( QgsSymbolV2RenderContext& ctx, const QgsCoordinat

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

case QgsWKBTypes::CurvePolygon:
tempGeom = geom->segmentize();
if ( !tempGeom )
break;
FALLTHROUGH;
case QgsWKBTypes::Polygon:
{
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit 58933aa

Please sign in to comment.