Skip to content

Commit

Permalink
Fix leak in add map tool
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 1, 2015
1 parent 2904689 commit 8ce9930
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/core/geometry/qgsgeometry.sip
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class QgsGeometry
* geom is transferred.
* @note added in QGIS 2.10
*/
QgsGeometry( QgsAbstractGeometryV2* geom /Transfer/ );
explicit QgsGeometry( QgsAbstractGeometryV2* geom /Transfer/ );

//! Destructor
~QgsGeometry();
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooladdfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ void QgsMapToolAddFeature::canvasMapReleaseEvent( QgsMapMouseEvent* e )
poly = new QgsPolygonV2();
}
poly->setExteriorRing( curveToAdd );
f->setGeometry( poly );
f->setGeometry( new QgsGeometry( poly ) );

int avoidIntersectionsReturn = f->geometry()->avoidIntersections();
if ( avoidIntersectionsReturn == 1 )
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class CORE_EXPORT QgsGeometry
* geom is transferred.
* @note added in QGIS 2.10
*/
QgsGeometry( QgsAbstractGeometryV2* geom );
explicit QgsGeometry( QgsAbstractGeometryV2* geom );

//! Destructor
~QgsGeometry();
Expand Down

0 comments on commit 8ce9930

Please sign in to comment.