diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-12-16 19:17:44 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-12-16 23:59:35 +0100 |
commit | 9cca2ca9af012ff8f96699febba0dc860768ef3c (patch) | |
tree | a8eae81537f0f9c94d1fefcc4a5b10d9252556f8 /sw | |
parent | 9bf3eb328bc85c0a4702056ae3e49c41c5a8b9d9 (diff) |
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/46610
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 49ada34c9920..83b68aae6f0b 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -3571,9 +3571,9 @@ void SwTextNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewVa } // 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) if(!bReset && RES_ATTRSET_CHG == nWhich) // ..on ItemChange from DrawingLayer FillAttributes |