[QGIS Commit] r9438 - trunk/qgis/src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Mon Oct 6 09:33:45 EDT 2008
Author: timlinux
Date: 2008-10-06 09:33:45 -0400 (Mon, 06 Oct 2008)
New Revision: 9438
Modified:
trunk/qgis/src/core/qgsvectorfilewriter.cpp
Log:
Prevent crash on export as shapefile if coor transform is uninitialised
Modified: trunk/qgis/src/core/qgsvectorfilewriter.cpp
===================================================================
--- trunk/qgis/src/core/qgsvectorfilewriter.cpp 2008-10-06 13:00:45 UTC (rev 9437)
+++ trunk/qgis/src/core/qgsvectorfilewriter.cpp 2008-10-06 13:33:45 UTC (rev 9438)
@@ -299,7 +299,7 @@
{
const QgsCoordinateReferenceSystem* outputCRS;
- QgsCoordinateTransform* ct;
+ QgsCoordinateTransform* ct = 0;
QgsVectorDataProvider* provider = layer->dataProvider();
int shallTransform = false;
@@ -322,10 +322,6 @@
WriterError err = writer->hasError();
if ( err != NoError )
{
- if ( ct != NULL )
- {
- delete ct;
- }
delete writer;
return err;
}
More information about the QGIS-commit
mailing list