diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-19 09:43:25 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-19 09:44:30 +0200 |
commit | c260c34be04643a143573c6f76b03da06b58bb49 (patch) | |
tree | 0815f4b5dbc4121dc65fa614fffb3d5636c6a1aa /editeng | |
parent | 8396bffef734a543ee81a742d6d4ac8ed03d046a (diff) |
fix cppcheck:nullPointerRedundantCheck commit
fix my commit 2d64fcf4c8d3316ad9ae2232601678553dcad6a3
"cppcheck:nullPointerRedundantCheck"
Change-Id: I0875005d938b43a91e15c564a23d70cb097548a9
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/flditem.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/frmitems.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx index b308abe0e1ec..73cb29c2f308 100644 --- a/editeng/source/items/flditem.cxx +++ b/editeng/source/items/flditem.cxx @@ -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 ); diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx index 1b8912d29b4d..11cbfe2825c9 100644 --- a/editeng/source/items/frmitems.cxx +++ b/editeng/source/items/frmitems.cxx @@ -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; } |