[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Sat Jan 9 11:58:53 UTC 2021


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

New commits:
commit 4cade44cff637be919e13e5598a1dadb287846f5
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Jan 8 19:26:42 2021 +0000
Commit:     Caolán McNamara <caolanm at 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 <caolanm at 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;


More information about the Libreoffice-commits mailing list