From 8b6e914305d978892e106a575662a2a5217242dc Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 7 Jan 2017 20:54:08 +0000 Subject: coverity#1358841 Explicit null dereferenced Change-Id: I1c4cff09a7c549e9a14886c1460a7e2c2c74f757 --- sw/source/core/text/txtfrm.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sw') 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 ); -- cgit