sw/source/uibase/utlui/numfmtlb.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bca65be38b652c54e08c104fdcd0133b4113a2db
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Aug 9 16:10:03 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sat Aug 9 22:02:51 2025 +0200

    cid#1660803 silence Dereference null return value
    
    Change-Id: Ia7b08d620ed5fd2c2266053064622600fe3bae46
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189265
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/uibase/utlui/numfmtlb.cxx 
b/sw/source/uibase/utlui/numfmtlb.cxx
index a7251b159953..b51a20563b93 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -239,7 +239,6 @@ void SwNumFormatBase::SetFormatType(const SvNumFormatType 
nFormatType)
         break;
     }
 
-    const SvNumberformat* pFormat;
     sal_Int32 i = 0;
     const Color* pCol;
     double fVal = SwNumFormatBase::GetDefValue(nFormatType);
@@ -256,7 +255,8 @@ void SwNumFormatBase::SetFormatType(const SvNumFormatType 
nFormatType)
     {
         const sal_uInt32 nFormat = pFormatter->GetFormatIndex(
                         static_cast<NfIndexTableOffset>(nIndex), 
m_eCurLanguage );
-        pFormat = pFormatter->GetEntry( nFormat );
+        const SvNumberformat* pFormat = pFormatter->GetEntry(nFormat);
+        assert(pFormat && "will exist");
 
         if( nFormat == pFormatter->GetFormatIndex( NF_NUMBER_STANDARD,
                                                     m_eCurLanguage )

Reply via email to