Skip to content

Commit

Permalink
fix linestring to return a null geometry when coordinates are not nub…
Browse files Browse the repository at this point in the history
…mers
  • Loading branch information
lbartoletti committed Aug 24, 2020
1 parent 74984c1 commit 0287da1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/geometry/qgslinestring.cpp
Expand Up @@ -440,7 +440,11 @@ bool QgsLineString::fromWkt( const QString &wkt )
if ( parts.second.compare( QLatin1String( "NULL" ), Qt::CaseInsensitive ) == 0 )
return false;

setPoints( QgsGeometryUtils::pointsFromWKT( parts.second, is3D(), isMeasure() ) );
QgsPointSequence points = QgsGeometryUtils::pointsFromWKT( parts.second, is3D(), isMeasure() );
if ( points.isEmpty() )
return false;

setPoints( points );
return true;
}

Expand Down

0 comments on commit 0287da1

Please sign in to comment.