Skip to content
Permalink
Browse files

fix linestring to return a null geometry when coordinates are not nub…

…mers
  • Loading branch information
lbartoletti committed Aug 24, 2020
1 parent 74984c1 commit 0287da1844cefd39f77c7e35046391fa41b38002
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/core/geometry/qgslinestring.cpp
@@ -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;
}

0 comments on commit 0287da1

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