sw/source/uibase/app/swmodul1.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit d479a215538590e50ea9d8fb29ac972df06c6d10
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Feb 23 10:34:45 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Feb 23 13:50:45 2022 +0100

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

diff --git a/sw/source/uibase/app/swmodul1.cxx 
b/sw/source/uibase/app/swmodul1.cxx
index 183ce20261b4..fd0122fd3445 100644
--- a/sw/source/uibase/app/swmodul1.cxx
+++ b/sw/source/uibase/app/swmodul1.cxx
@@ -217,6 +217,7 @@ void SwModule::ApplyUserMetric( FieldUnit eMetric, bool 
bWeb )
                 GetUsrPref(false);
             pPref = m_pUsrPref.get();
         }
+        assert(pPref && "pPref is set by here");
         FieldUnit eOldMetric = pPref->GetMetric();
         if(eOldMetric != eMetric)
             pPref->SetMetric(eMetric);

Reply via email to