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

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Sep 1 19:03:37 UTC 2020


 sw/source/core/text/txtfld.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3db362c4788864b250c511c930c1b908d4b47ca7
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Sep 1 08:48:23 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Sep 1 21:02:55 2020 +0200

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

diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index 7e7aa65f3c43..79944f166ed0 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -478,8 +478,8 @@ static void checkApplyParagraphMarkFormatToNumbering(SwFont* pNumFnt, SwTextForm
             {
                 // Copy from parent sets only allowed items which will not overwrite
                 // values explicitly defined in current set (pCleanedSet) or in pFormat
-                const SfxPoolItem* pItem = rStyleAttrs.GetItem(nWhich, true);
-                pCleanedSet->Put(*pItem);
+                if (const SfxPoolItem* pItem = rStyleAttrs.GetItem(nWhich, true))
+                    pCleanedSet->Put(*pItem);
             }
             nWhich = aIter.NextWhich();
         }


More information about the Libreoffice-commits mailing list