[Libreoffice-commits] core.git: vcl/unx

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Jan 28 10:54:22 UTC 2019


 vcl/unx/gtk3/gtk3gtkinst.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 026b3d9b339992eb14698cc26334e2f500b018ce
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Jan 28 10:36:15 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Jan 28 11:53:58 2019 +0100

    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 at collabora.co.uk>

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:


More information about the Libreoffice-commits mailing list