diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-03-12 19:43:54 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-03-12 20:22:17 +0100 |
commit | ae09c25c0a94ef87b66117f6b27ee660b0b4d3d1 (patch) | |
tree | a2a3a48c26a20477ea63660c72e915fdbcabdd20 /sfx2/source | |
parent | a8b6ffa99d48f12a63ee6259c2ef2836c3fdaba8 (diff) |
sfx2: PVS-Studio V595 'pLastState' pointer could be null
... actually not but perhaps removing the pointless duplication helps.
Change-Id: I004fea113674703264d22eb9c7a397916e85a2f6
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index d687a5d8a7d1..45bd65e95774 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -974,11 +974,11 @@ void SfxDispatchController_Impl::StateChanged( sal_uInt16 nSID, SfxItemState eSt { if ( !pState->ISA( SfxVisibilityItem ) ) { - bool bBothAvailable = pLastState && !IsInvalidItem(pLastState); - if ( bBothAvailable ) + if (pLastState && !IsInvalidItem(pLastState)) + { bNotify = pState->Type() != pLastState->Type() || *pState != *pLastState; - if ( pLastState && !IsInvalidItem( pLastState ) ) delete pLastState; + } pLastState = !IsInvalidItem(pState) ? pState->Clone() : pState; bVisible = true; } |