Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Prevent crash on export as shapefile if coor transform is uninitialised
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9438 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux committed Oct 6, 2008
1 parent 66ae77d commit 6c915eb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/qgsvectorfilewriter.cpp
Expand Up @@ -299,7 +299,7 @@ QgsVectorFileWriter::writeAsShapefile( QgsVectorLayer* layer,
{

const QgsCoordinateReferenceSystem* outputCRS;
QgsCoordinateTransform* ct;
QgsCoordinateTransform* ct = 0;

QgsVectorDataProvider* provider = layer->dataProvider();
int shallTransform = false;
Expand All @@ -322,10 +322,6 @@ QgsVectorFileWriter::writeAsShapefile( QgsVectorLayer* layer,
WriterError err = writer->hasError();
if ( err != NoError )
{
if ( ct != NULL )
{
delete ct;
}
delete writer;
return err;
}
Expand Down

0 comments on commit 6c915eb

Please sign in to comment.