summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/bindings.cxx5
-rw-r--r--sfx2/source/control/statcach.cxx5
2 files changed, 8 insertions, 2 deletions
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 94b9fea11e4b..ce4d3a4230d4 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1591,7 +1591,10 @@ SfxItemState SfxBindings::QueryState( sal_uInt16 nSlot, std::unique_ptr<SfxPoolI
xBind->Release();
xBind.clear();
if ( bDeleteCache )
- DELETEZ( pCache );
+ {
+ delete pCache;
+ pCache = nullptr;
+ }
return eState;
}
}
diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx
index dfdc10f83687..b71b96a62579 100644
--- a/sfx2/source/control/statcach.cxx
+++ b/sfx2/source/control/statcach.cxx
@@ -428,7 +428,10 @@ void SfxStateCache::SetState_Impl
// Remember new value
if ( !IsInvalidItem(pLastItem) )
- DELETEZ(pLastItem);
+ {
+ delete pLastItem;
+ pLastItem = nullptr;
+ }
if ( pState && !IsInvalidItem(pState) )
pLastItem = pState->Clone();
else