[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - vcl/unx

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Feb 8 02:45:16 UTC 2020


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

New commits:
commit b6a0dd44e5862471ef7804951b01570700d2e33c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Feb 7 09:39:29 2020 +0000
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Sat Feb 8 03:44:57 2020 +0100

    tdf#129809 take a reference in case m_aContents is replaced
    
    Change-Id: I36ae74b6b3424bd2f0b71bc54838ec39e504b6d7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88180
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
    Tested-by: Jenkins

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 9d992eb81c4f..844a9f5a493b 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -367,7 +367,10 @@ void VclGtkClipboard::ClipboardGet(GtkSelectionData *selection_data, guint info)
 {
     if (!m_aContents.is())
         return;
-    m_aConversionHelper.setSelectionData(m_aContents, selection_data, info);
+    // tdf#129809 take a reference in case m_aContents is replaced during this
+    // call
+    Reference<datatransfer::XTransferable> xCurrentContents(m_aContents);
+    m_aConversionHelper.setSelectionData(xCurrentContents, selection_data, info);
 }
 
 namespace


More information about the Libreoffice-commits mailing list