summaryrefslogtreecommitdiff
path: root/sfx2/source/toolbox
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-17 17:45:07 +0000
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 11:44:14 +0100
commita140e0d0bab3bd09fe19711fc99e411fcc2675d7 (patch)
tree3304d6fcd4b652b3c9e9f23e777885eb4537a0e6 /sfx2/source/toolbox
parent15178933b18bc3980890c1cd5a3f0e8ec3d5c744 (diff)
fix explicit delete.
Change-Id: I6d12eb32e9c8fcb403473c41b3a6eb2f29fe8639
Diffstat (limited to 'sfx2/source/toolbox')
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index e993174b4ca5..c849ac7b3c90 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -274,9 +274,9 @@ void SAL_CALL SfxToolBoxControl::dispose() throw (::com::sun::star::uno::Runtime
// Remove and destroy our item window at our toolbox
SolarMutexGuard aGuard;
- vcl::Window* pWindow = pImpl->pBox->GetItemWindow( pImpl->nTbxId );
+ VclPtr< vcl::Window > pWindow = pImpl->pBox->GetItemWindow( pImpl->nTbxId );
pImpl->pBox->SetItemWindow( pImpl->nTbxId, 0 );
- delete pWindow;
+ pWindow.disposeAndClear();
// Dispose an open sub toolbar. It's possible that we have an open
// sub toolbar while we get disposed. Therefore we have to dispose