sw/source/uibase/uno/unotxdoc.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4cade44cff637be919e13e5598a1dadb287846f5
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Jan 8 19:26:42 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sat Jan 9 12:58:03 2021 +0100

    cid#1471677 Dereference after null check
    
    Change-Id: Ida02184e2cce87f8cfcf4ad380855175ea958f45
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109014
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 338230b1173e..4ef8253e5fa2 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3601,7 +3601,7 @@ uno::Reference<datatransfer::XTransferable> 
SwXTextDocument::getSelection()
         }
     }
 
-    if (!xTransferable.is())
+    if (!xTransferable.is() && pWrtShell)
         xTransferable = new SwTransferable(*pWrtShell);
 
     return xTransferable;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to