Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix leak in QgsDistanceArea
  • Loading branch information
nyalldawson committed Aug 25, 2015
1 parent a954c3f commit b20b4d8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/qgsdistancearea.cpp
Expand Up @@ -56,6 +56,7 @@ QgsDistanceArea::QgsDistanceArea()

//! Copy constructor
QgsDistanceArea::QgsDistanceArea( const QgsDistanceArea & origDA )
: mCoordTransform( 0 )
{
_copy( origDA );
}
Expand Down Expand Up @@ -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() );
}

Expand Down

0 comments on commit b20b4d8

Please sign in to comment.