diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-09 10:28:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-09 10:44:23 +0100 |
commit | 3c56e2686a3556653c6c627264e7503df31032fd (patch) | |
tree | 1e6e5f56bf818cb11937a4991a65af4997ae9234 /starmath | |
parent | e4cc3330d0829578086b8e6cc86590b8a9b0659d (diff) |
coverity#705478 Dereference null return value
Change-Id: I3dc6ed508992bc952f1cf34e6d9e26354895bc27
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/cfgitem.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 12f03e73e038..5206f0286d25 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -752,7 +752,11 @@ void SmMathConfig::SaveFontFormatList() for (size_t i = 0; i < nCount; ++i) { OUString aFntFmtId( rFntFmtList.GetFontFormatId( i ) ); - const SmFontFormat aFntFmt( *rFntFmtList.GetFontFormat( aFntFmtId ) ); + const SmFontFormat *pFntFmt = rFntFmtList.GetFontFormat( aFntFmtId ); + assert(pFntFmt); + if (!pFntFmt) + continue; + const SmFontFormat aFntFmt( *pFntFmt ); OUString aNodeNameDelim( FONT_FORMAT_LIST ); aNodeNameDelim += aDelim; |