Skip to content
Permalink
Browse files

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

  • Loading branch information
jef-n committed Dec 14, 2016
1 parent 7ce2d3e commit 159ad683fe3a413dcdeba91079d3c7fa629fa580
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/core/dxf/qgsdxfexport.cpp
@@ -3715,6 +3715,8 @@ void QgsDxfExport::addFeature( QgsSymbolRenderContext& ctx, const QgsCoordinateT
case QgsWkbTypes::CircularString:
case QgsWkbTypes::CompoundCurve:
tempGeom = geom->segmentize();
if ( !tempGeom )
break;
FALLTHROUGH;
case QgsWkbTypes::LineString:
if ( !qgsDoubleNear( offset, 0.0 ) )
@@ -3733,6 +3735,8 @@ void QgsDxfExport::addFeature( QgsSymbolRenderContext& ctx, const QgsCoordinateT

case QgsWkbTypes::MultiCurve:
tempGeom = geom->segmentize();
if ( !tempGeom )
break;
FALLTHROUGH;
case QgsWkbTypes::MultiLineString:
{
@@ -3757,6 +3761,8 @@ void QgsDxfExport::addFeature( QgsSymbolRenderContext& ctx, const QgsCoordinateT

case QgsWkbTypes::CurvePolygon:
tempGeom = geom->segmentize();
if ( !tempGeom )
break;
FALLTHROUGH;
case QgsWkbTypes::Polygon:
{
@@ -3815,6 +3821,8 @@ void QgsDxfExport::addFeature( QgsSymbolRenderContext& ctx, const QgsCoordinateT
{
case QgsWkbTypes::CurvePolygon:
tempGeom = tempGeom->segmentize();
if ( !tempGeom )
break;
FALLTHROUGH;
case QgsWkbTypes::Polygon:
writePolygon( tempGeom->coordinateSequence().at( 0 ), layer, QStringLiteral( "SOLID" ), brushColor );

0 comments on commit 159ad68

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