diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-28 10:36:15 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-28 11:53:58 +0100 |
commit | 026b3d9b339992eb14698cc26334e2f500b018ce (patch) | |
tree | d272f5b67e3db2336d1c8651c7ca8db1081e4d09 | |
parent | 525a5ea36310168c810dad6a8e764bf2ad2afce0 (diff) |
tdf#122997 Canceling Paragraph dialog causes crash
regression from
commit bf359d01ac8b1e0292e8a92c38e58c03e6c17d8b
add a Dialog::runAsync for the non-controller case
Change-Id: I02e3f62b8304139003af1c137ea59750afb4be4c
Reviewed-on: https://gerrit.libreoffice.org/66988
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 8392ab4e97a5..f5cc12335744 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -2415,8 +2415,10 @@ private: hide(); m_aFunc(GtkToVcl(ret)); m_aFunc = nullptr; + // move the self pointer, otherwise it might be de-allocated by time we try to reset it + std::shared_ptr<GtkInstanceDialog> me = std::move(m_xRunAsyncSelf); m_xDialogController.reset(); - m_xRunAsyncSelf.reset(); + me.reset(); } public: |