Skip to content
Permalink
Browse files

vector file writer: avoid duplicate destruction of coordinate transfo…

…rm in case of exceptions (fixes #9993)
  • Loading branch information
jef-n committed Oct 26, 2014
1 parent 748e7cf commit cc4fc5a01f5559e111faff4b17be837014185ffd
Showing with 0 additions and 4 deletions.
  1. +0 −4 src/core/qgsvectorfilewriter.cpp
@@ -1927,7 +1927,6 @@ QgsVectorFileWriter::WriterError QgsVectorFileWriter::writeAsVectorFormat( QgsVe
{
QgsVectorFileWriter::WriterError error = writer->exportFeaturesSymbolLevels( layer, fit, ct, errorMessage );
delete writer;
delete ct;
return ( error == NoError ) ? NoError : ErrFeatureWriteFailed;
}
}
@@ -1969,7 +1968,6 @@ QgsVectorFileWriter::WriterError QgsVectorFileWriter::writeAsVectorFormat( QgsVe
}
catch ( QgsCsException &e )
{
delete ct;
delete writer;

QString msg = QObject::tr( "Failed to transform a point while drawing a feature with ID '%1'. Writing stopped. (Exception: %2)" )
@@ -2471,8 +2469,6 @@ QgsVectorFileWriter::WriterError QgsVectorFileWriter::exportFeaturesSymbolLevels
}
catch ( QgsCsException &e )
{
delete ct;

QString msg = QObject::tr( "Failed to transform, writing stopped. (Exception: %1)" )
.arg( e.what() );
QgsLogger::warning( msg );

0 comments on commit cc4fc5a

Please sign in to comment.
You can’t perform that action at this time.