From 5dcb065d24fd9b57b6dc65a19a8a8c8bbaa22c44 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Tue, 15 May 2018 10:15:01 +0300 Subject: [PATCH] NFC: unassigned variable pNewItem is always nullptr In 2015 commit 2ebd79b3d214c62c0997606115ebc50700d6a760 a possible initialization of the variable was removed. So at this point pNewItem must return false. Change-Id: I5af9d8440463c96323c38a01f255c1dbb0113e09 Reviewed-on: https://gerrit.libreoffice.org/54395 Reviewed-by: Noel Grandin Tested-by: Jenkins Reviewed-by: Justin Luth --- svl/source/items/itemprop.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svl/source/items/itemprop.cxx b/svl/source/items/itemprop.cxx index fd22a4f68733..98c19b200d90 100644 --- a/svl/source/items/itemprop.cxx +++ b/svl/source/items/itemprop.cxx @@ -218,7 +218,7 @@ void SfxItemPropertySet::setPropertyValue( const SfxItemPropertySimpleEntry& rEn SfxItemState eState = rSet.GetItemState( rEntry.nWID, true, &pItem ); if (SfxItemState::SET != eState && SfxItemPool::IsWhich(rEntry.nWID)) pItem = &rSet.GetPool()->GetDefaultItem(rEntry.nWID); - if(!pNewItem && pItem) + if (pItem) { pNewItem.reset(pItem->Clone()); }