Skip to content

Commit b4937cb

Browse files
author
timlinux
committedOct 6, 2008
Prevent crash on export as shapefile if coor transform is uninitialised
git-svn-id: http://svn.osgeo.org/qgis/trunk@9438 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 8113217 commit b4937cb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed
 

‎src/core/qgsvectorfilewriter.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ QgsVectorFileWriter::writeAsShapefile( QgsVectorLayer* layer,
299299
{
300300

301301
const QgsCoordinateReferenceSystem* outputCRS;
302-
QgsCoordinateTransform* ct;
302+
QgsCoordinateTransform* ct = 0;
303303

304304
QgsVectorDataProvider* provider = layer->dataProvider();
305305
int shallTransform = false;
@@ -322,10 +322,6 @@ QgsVectorFileWriter::writeAsShapefile( QgsVectorLayer* layer,
322322
WriterError err = writer->hasError();
323323
if ( err != NoError )
324324
{
325-
if ( ct != NULL )
326-
{
327-
delete ct;
328-
}
329325
delete writer;
330326
return err;
331327
}

0 commit comments

Comments
 (0)
Please sign in to comment.