From d87d230bb4bcbe091fe35bb047d54f7d9fcaabb8 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Wed, 14 Oct 2020 13:31:59 +1000 Subject: [PATCH] Fix crash in undo dock when clearing project/closing QGIS Fixes #38157 --- src/app/qgsundowidget.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/qgsundowidget.h b/src/app/qgsundowidget.h index aa12c8515124..8c02251c55ca 100644 --- a/src/app/qgsundowidget.h +++ b/src/app/qgsundowidget.h @@ -25,6 +25,7 @@ #include #include #include +#include #include "qgspanelwidget.h" #include "qgis_app.h" @@ -93,7 +94,7 @@ class APP_EXPORT QgsUndoWidget : public QgsPanelWidget private: QUndoView *mUndoView = nullptr; - QUndoStack *mUndoStack = nullptr; + QPointer< QUndoStack > mUndoStack; QgsMapCanvas *mMapCanvas = nullptr; int mPreviousIndex = 0;