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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 9 14:39:16 UTC 2020


 sw/source/core/doc/DocumentContentOperationsManager.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 20d06c7c3e25e486d013049ed817d66be1bcb4af
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Sep 9 10:42:36 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Sep 9 16:38:28 2020 +0200

    cid#1466667 silence Dereference null return value
    
    Change-Id: I52541e74a07fa2decdae75b8a6f145432ac7e114
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102292
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index de753f6fb7a2..06edf59efd66 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -3044,7 +3044,9 @@ SwDrawFrameFormat* DocumentContentOperationsManager::InsertDrawObj(
         eAnchorId = aAnch.GetAnchorId();
         if ( eAnchorId == RndStdIds::FLY_AT_FLY )
         {
-            SwPosition aPos( *rRg.GetNode().FindFlyStartNode() );
+            const SwStartNode* pStartNode = rRg.GetNode().FindFlyStartNode();
+            assert(pStartNode);
+            SwPosition aPos(*pStartNode);
             aAnch.SetAnchor( &aPos );
         }
         else


More information about the Libreoffice-commits mailing list