Skip to content

Commit 76abb78

Browse files
author
jef
committedNov 28, 2009

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/core/qgsvectorfilewriter.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,12 @@ bool QgsVectorFileWriter::addFeature( QgsFeature& feature )
266266

267267
// build geometry from WKB
268268
QgsGeometry *geom = feature.geometry();
269+
if ( !geom )
270+
{
271+
QgsDebugMsg( "invalid geometry" );
272+
OGR_F_Destroy( poFeature );
273+
return false;
274+
}
269275

270276
if ( geom->wkbType() != mWkbType )
271277
{

0 commit comments

Comments
 (0)
Please sign in to comment.