summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-09-30 11:57:40 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2019-09-30 14:47:41 +0200
commitec580f5ee7b40b9d778cce41fdff08276fecfe54 (patch)
tree7a754a3e2e5558146fa03935d0858c1b5c89ec47
parentf78090e3d5cc21f8b6c110b39d9f2057d2fa24e9 (diff)
pNew could be nullptr
Both if branches dereference pNew, so just check for that instead of useless check for ( pOld || pNew ) which is granted if pOld != pNew Change-Id: I5654c0a4e12e614d4d2068ddae582c1b86f2d61f Reviewed-on: https://gerrit.libreoffice.org/79837 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--sw/source/core/undo/rolbck.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/undo/rolbck.cxx b/sw/source/core/undo/rolbck.cxx
index 2fbc1356f4cf..a80d270cb81f 100644
--- a/sw/source/core/undo/rolbck.cxx
+++ b/sw/source/core/undo/rolbck.cxx
@@ -1298,7 +1298,7 @@ SwRegHistory::SwRegHistory( const SwNode& rNd, SwHistory* pHst )
void SwRegHistory::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
- if ( m_pHistory && ( pOld || pNew ) && pOld != pNew )
+ if ( m_pHistory && pNew && pOld != pNew )
{
if ( pNew->Which() < POOLATTR_END )
{