Skip to content

Commit

Permalink
Fix crash in QgsVectorFileWriter::addFeature()
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
rouault committed Jun 17, 2014
1 parent 45ebe53 commit 1bfd01b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/qgsvectorfilewriter.cpp
Expand Up @@ -1548,6 +1548,8 @@ bool QgsVectorFileWriter::addFeature( QgsFeature& feature, QgsFeatureRendererV2*
{
// create the feature
OGRFeatureH poFeature = createFeature( feature );
if( !poFeature )
return false;

//add OGR feature style type
if ( mSymbologyExport != NoSymbology && renderer )
Expand Down

0 comments on commit 1bfd01b

Please sign in to comment.