Kaydet (Commit) 9cca2ca9 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1426162 refactor to be more clear

and help out coverity wrt 'Dereference after null check'

Change-Id: I8c07fd0afc686e1c0bfd87d9c8bd1ea341f6e616
Reviewed-on: https://gerrit.libreoffice.org/46610Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 9bf3eb32
...@@ -3571,9 +3571,9 @@ void SwTextNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewVa ...@@ -3571,9 +3571,9 @@ void SwTextNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewVa
} }
// reset fill information // reset fill information
if(maFillAttributes.get()) if (maFillAttributes.get() && pNewValue)
{ {
const sal_uInt16 nWhich = pNewValue ? pNewValue->Which() : 0; const sal_uInt16 nWhich = pNewValue->Which();
bool bReset(RES_FMT_CHG == nWhich); // ..on format change (e.g. style changed) bool bReset(RES_FMT_CHG == nWhich); // ..on format change (e.g. style changed)
if(!bReset && RES_ATTRSET_CHG == nWhich) // ..on ItemChange from DrawingLayer FillAttributes if(!bReset && RES_ATTRSET_CHG == nWhich) // ..on ItemChange from DrawingLayer FillAttributes
......
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