diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-07 20:54:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-07 21:57:03 +0000 |
commit | 8b6e914305d978892e106a575662a2a5217242dc (patch) | |
tree | ef437e81548d8ac268f3b5ab4ac126bc7fd02ee4 /sw | |
parent | 1e50b35595b8e0b8d1dc03145f5ee33b7224fc31 (diff) |
coverity#1358841 Explicit null dereferenced
Change-Id: I1c4cff09a7c549e9a14886c1460a7e2c2c74f757
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/txtfrm.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index 30117ed2361c..ee613621febe 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -2285,7 +2285,7 @@ void SwTextFrame::CalcHeightOfLastLine( const bool _bUseFont ) aFont.SetFntChg( true ); aFont.ChgPhysFnt( pVsh, *pOut ); mnHeightOfLastLine = aFont.GetHeight( pVsh, *pOut ); - //coverity[var_deref_model] - pLastFont is set in SwSubFont::ChgFnt + assert(pLastFont && "coverity[var_deref_model] - pLastFont should be set in SwSubFont::ChgFnt"); pLastFont->Unlock(); pLastFont = pOldFont; pLastFont->SetDevFont( pVsh, *pOut ); @@ -2296,7 +2296,7 @@ void SwTextFrame::CalcHeightOfLastLine( const bool _bUseFont ) aFont.SetFntChg( true ); aFont.ChgPhysFnt( pVsh, *pOut ); mnHeightOfLastLine = aFont.GetHeight( pVsh, *pOut ); - //coverity[var_deref_model] - pLastFont is set in SwSubFont::ChgFnt + assert(pLastFont && "coverity[var_deref_model] - pLastFont should be set in SwSubFont::ChgFnt"); pLastFont->Unlock(); pLastFont = nullptr; pOut->SetFont( aOldFont ); |