Skip to content

Commit 1bfd01b

Browse files
committedJun 17, 2014
Fix crash in QgsVectorFileWriter::addFeature()
createFeature() might return a NULL pointer that OGR_L_CreateFeature() will crash upon when GDAL is compiled in debug mode (where null pointer assertions are turned on)
1 parent 45ebe53 commit 1bfd01b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎src/core/qgsvectorfilewriter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,6 +1548,8 @@ bool QgsVectorFileWriter::addFeature( QgsFeature& feature, QgsFeatureRendererV2*
15481548
{
15491549
// create the feature
15501550
OGRFeatureH poFeature = createFeature( feature );
1551+
if( !poFeature )
1552+
return false;
15511553

15521554
//add OGR feature style type
15531555
if ( mSymbologyExport != NoSymbology && renderer )

0 commit comments

Comments
 (0)
Please sign in to comment.