summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-18 08:33:14 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 11:59:25 +0100
commit0556598b35eb6d81fdaff04520f14202660f0333 (patch)
tree2fb64309bbd8e519f25b1e55824bad5513754e91 /svtools
parent7aa921cb53eedd0a107fbe9f75365adcce4d37d9 (diff)
vclwidget: check for calling delete on subclasses of vcl::Window
Change-Id: I7fb7cf919e3f46dd03a18b1cb95fa881915f9642
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/fileview.cxx6
-rw-r--r--svtools/source/dialogs/wizardmachine.cxx2
-rw-r--r--svtools/source/uno/popupwindowcontroller.cxx2
3 files changed, 3 insertions, 7 deletions
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index ef2e2daf93a4..41f5212d4573 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1589,11 +1589,7 @@ SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommand
SvtFileView_Impl::~SvtFileView_Impl()
{
Clear();
-
- // use temp pointer to prevent access of deleted member (GetFocus())
- ViewTabListBox_Impl* pTemp = mpView;
- mpView = NULL;
- delete pTemp;
+ mpView.disposeAndClear();
}
diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx
index 47e81789afaf..98094429a9bb 100644
--- a/svtools/source/dialogs/wizardmachine.cxx
+++ b/svtools/source/dialogs/wizardmachine.cxx
@@ -214,7 +214,7 @@ namespace svt
m_pHelp.disposeAndClear();
for (WizardState i=0; i<m_pImpl->nFirstUnknownPage; ++i)
- delete GetPage(i);
+ VclPtr<vcl::Window>(GetPage(i)).disposeAndClear();
delete m_pImpl;
WizardDialog::dispose();
diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx
index d308d53d693a..7bcd32bc8d21 100644
--- a/svtools/source/uno/popupwindowcontroller.cxx
+++ b/svtools/source/uno/popupwindowcontroller.cxx
@@ -126,7 +126,7 @@ IMPL_LINK( PopupWindowControllerImpl, WindowEventListener, VclSimpleEvent*, pEve
IMPL_STATIC_LINK( PopupWindowControllerImpl, AsyncDeleteWindowHdl, vcl::Window*, pWindow )
{
(void)*pThis;
- delete pWindow;
+ VclPtr<vcl::Window>(pWindow).disposeAndClear();
return 0;
}