Skip to content
Permalink
Browse files

Fix leak in QgsDistanceArea

  • Loading branch information
nyalldawson committed Aug 25, 2015
1 parent a954c3f commit b20b4d8a99b3c4c1a804d32e65a12d753df53925
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/core/qgsdistancearea.cpp
@@ -56,6 +56,7 @@ QgsDistanceArea::QgsDistanceArea()

//! Copy constructor
QgsDistanceArea::QgsDistanceArea( const QgsDistanceArea & origDA )
: mCoordTransform( 0 )
{
_copy( origDA );
}
@@ -88,6 +89,7 @@ void QgsDistanceArea::_copy( const QgsDistanceArea & origDA )
// Some calculations and trig. Should not be TOO time consuming.
// Alternatively we could copy the temp vars?
computeAreaInit();
delete mCoordTransform;
mCoordTransform = new QgsCoordinateTransform( origDA.mCoordTransform->sourceCrs(), origDA.mCoordTransform->destCRS() );
}

0 comments on commit b20b4d8

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