Skip to content

Commit

Permalink
vector file writer: avoid duplicate destruction of coordinate transfo…
Browse files Browse the repository at this point in the history
…rm in case of exceptions (fixes #9993)
  • Loading branch information
jef-n committed Oct 26, 2014
1 parent 748e7cf commit cc4fc5a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/core/qgsvectorfilewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down Expand Up @@ -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)" )
Expand Down Expand Up @@ -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 );
Expand Down

0 comments on commit cc4fc5a

Please sign in to comment.