sw/source/uibase/uno/unotxdoc.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 7841d75fb2761c016be4aee2c17e2a6753423fbf
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Jul 5 13:05:25 2024 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Wed Jul 10 11:09:18 2024 +0200

    return early if there is no m_pDocShell
    
    Change-Id: Id53115f9cb098b9b8ff1a529f5237054cdfd391e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170014
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170049
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins
    (cherry picked from commit 9e8c9944b9e00e883597495a27f2f03d69016ce2)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170038
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit 065a38184ec47334b6e6b222de1a43b685943f9e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170232
    Tested-by: Michael Stahl <michael.st...@allotropia.de>
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index f5e0904fa8d3..06b07d28ad11 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3204,6 +3204,12 @@ void SwXTextDocument::setClipboard(const 
uno::Reference<datatransfer::clipboard:
 {
     SolarMutexGuard aGuard;
 
+    if (!m_bObjectValid)
+    {
+        SAL_WARN("sw.uno", "no DocShell when attempting to setClipboard");
+        return;
+    }
+
     SwView* pView = m_pDocShell->GetView();
     if (pView)
         pView->GetEditWin().SetClipboard(xClipboard);

Reply via email to