Kaydet (Commit) c260c34b authored tarafından Noel Grandin's avatar Noel Grandin

fix cppcheck:nullPointerRedundantCheck commit

fix my commit 2d64fcf4
"cppcheck:nullPointerRedundantCheck"

Change-Id: I0875005d938b43a91e15c564a23d70cb097548a9
üst 8396bffe
......@@ -360,7 +360,7 @@ bool SvxFieldItem::operator==( const SfxPoolItem& rItem ) const
const SvxFieldData* pOtherFld = static_cast<const SvxFieldItem&>(rItem).GetField();
if( pField == pOtherFld )
return true;
if( pOtherFld == nullptr )
if( pField == nullptr || pOtherFld == nullptr )
return false;
return ( pField->Type() == pOtherFld->Type() )
&& ( *pField == *pOtherFld );
......
......@@ -1666,7 +1666,7 @@ inline bool CmpBrdLn( const SvxBorderLine* pBrd1, const SvxBorderLine* pBrd2 )
{
if( pBrd1 == pBrd2 )
return true;
if( pBrd1 == nullptr )
if( pBrd1 == nullptr || pBrd2 == nullptr)
return false;
return *pBrd1 == *pBrd2;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment