Skip to content

Commit

Permalink
Fix and wkt formating for delimited text provider test
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed May 26, 2015
1 parent 23ef9da commit 13d67c0
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 134 deletions.
4 changes: 4 additions & 0 deletions src/core/geometry/qgsgeometry.cpp
Expand Up @@ -147,6 +147,10 @@ const QgsAbstractGeometryV2* QgsGeometry::geometry() const
QgsGeometry* QgsGeometry::fromWkt( QString wkt )
{
QgsAbstractGeometryV2* geom = QgsGeometryImport::geomFromWkt( wkt );
if ( !geom )
{
return 0;
}
return new QgsGeometry( geom );
}

Expand Down
5 changes: 4 additions & 1 deletion src/core/geometry/qgsgeometryimport.cpp
Expand Up @@ -140,7 +140,10 @@ QgsAbstractGeometryV2* QgsGeometryImport::geomFromWkt( const QString& text )

if ( geom )
{
geom->fromWkt( text );
if ( !geom->fromWkt( text ) )
{
delete geom; return 0;
}
}
return geom;
}
Expand Down

0 comments on commit 13d67c0

Please sign in to comment.