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)

(Issue found when computing a Union on a layer that had one polygon already written, and another one created but not saved)