Skip to content

Commit

Permalink
Merge pull request #43133 from rouault/qgsappmaptools_double_free
Browse files Browse the repository at this point in the history
QgsAppMapTools: fix double-free during destruction of tools
  • Loading branch information
rouault committed May 8, 2021
2 parents 9c868db + f7c093d commit 4ee22a7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsmaptooladdcircle.h
Expand Up @@ -53,7 +53,7 @@ class APP_EXPORT QgsMapToolAddCircle: public QgsMapToolCapture
* The parent map tool, e.g. the add feature tool.
* Completed circle will be added to this tool by calling its addCurve() method.
*/
QgsMapToolCapture *mParentTool = nullptr;
QPointer<QgsMapToolCapture> mParentTool;
//! Circle points (in map coordinates)
QgsPointSequence mPoints;
//! The rubberband to show the circular string currently working on
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooladdcircularstring.h
Expand Up @@ -51,7 +51,7 @@ class APP_EXPORT QgsMapToolAddCircularString: public QgsMapToolCapture
* The parent map tool, e.g. the add feature tool.
* Completed circular strings will be added to this tool by calling its addCurve() method.
*/
QgsMapToolCapture *mParentTool = nullptr;
QPointer<QgsMapToolCapture> mParentTool;
//! Circular string points (in map coordinates)
QgsPointSequence mPoints;
//! The rubberband to show the already completed circular strings
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooladdellipse.h
Expand Up @@ -49,7 +49,7 @@ class APP_EXPORT QgsMapToolAddEllipse: public QgsMapToolCapture
* The parent map tool, e.g. the add feature tool.
* Completed ellipse will be added to this tool by calling its toLineString() method.
*/
QgsMapToolCapture *mParentTool = nullptr;
QPointer<QgsMapToolCapture> mParentTool;
//! Ellipse points (in map coordinates)
QgsPointSequence mPoints;
//! The rubberband to show the ellipse currently working on
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooladdrectangle.h
Expand Up @@ -50,7 +50,7 @@ class APP_EXPORT QgsMapToolAddRectangle: public QgsMapToolCapture
* The parent map tool, e.g. the add feature tool.
* Completed regular shape will be added to this tool by calling its addCurve() method.
*/
QgsMapToolCapture *mParentTool = nullptr;
QPointer<QgsMapToolCapture> mParentTool;
//! Regular Shape points (in map coordinates)
QgsPointSequence mPoints;
//! The rubberband to show the rectangle currently working on
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmaptooladdregularpolygon.h
Expand Up @@ -58,7 +58,7 @@ class APP_EXPORT QgsMapToolAddRegularPolygon: public QgsMapToolCapture
* The parent map tool, e.g. the add feature tool.
* Completed regular polygon will be added to this tool by calling its addCurve() method.
*/
QgsMapToolCapture *mParentTool = nullptr;
QPointer<QgsMapToolCapture> mParentTool;
//! Regular Shape points (in map coordinates)
QgsPointSequence mPoints;
//! The rubberband to show the regular polygon currently working on
Expand Down

0 comments on commit 4ee22a7

Please sign in to comment.