File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -467,11 +467,13 @@ std::unique_ptr< QgsCompoundCurve > QgsMssqlGeometryParser::readCompoundCurve( i
467467 switch ( SegmentType ( mSegment ) )
468468 {
469469 case SMT_FIRSTLINE:
470- if ( isCurve )
471- poCompoundCurve->addCurve ( readCircularString ( iPoint - nPointsPrepared, iPoint + 1 ).release () );
472- else
473- poCompoundCurve->addCurve ( readLineString ( iPoint - nPointsPrepared, iPoint + 1 ).release () );
474-
470+ if (nPointsPrepared > 0 )
471+ {
472+ if ( isCurve )
473+ poCompoundCurve->addCurve ( readCircularString ( iPoint - nPointsPrepared, iPoint + 1 ).release () );
474+ else
475+ poCompoundCurve->addCurve ( readLineString ( iPoint - nPointsPrepared, iPoint + 1 ).release () );
476+ }
475477 isCurve = false ;
476478 nPointsPrepared = 1 ;
477479 ++iPoint;
@@ -481,11 +483,13 @@ std::unique_ptr< QgsCompoundCurve > QgsMssqlGeometryParser::readCompoundCurve( i
481483 ++iPoint;
482484 break ;
483485 case SMT_FIRSTARC:
484- if ( isCurve )
485- poCompoundCurve->addCurve ( readCircularString ( iPoint - nPointsPrepared, iPoint + 1 ).release () );
486- else
487- poCompoundCurve->addCurve ( readLineString ( iPoint - nPointsPrepared, iPoint + 1 ).release () );
488-
486+ if ( nPointsPrepared > 0 )
487+ {
488+ if ( isCurve )
489+ poCompoundCurve->addCurve ( readCircularString ( iPoint - nPointsPrepared, iPoint + 1 ).release () );
490+ else
491+ poCompoundCurve->addCurve ( readLineString ( iPoint - nPointsPrepared, iPoint + 1 ).release () );
492+ }
489493 isCurve = true ;
490494 nPointsPrepared = 2 ;
491495 iPoint += 2 ;
You can’t perform that action at this time.
0 commit comments