summaryrefslogtreecommitdiff
path: root/basctl
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 /basctl
parent7aa921cb53eedd0a107fbe9f75365adcce4d37d9 (diff)
vclwidget: check for calling delete on subclasses of vcl::Window
Change-Id: I7fb7cf919e3f46dd03a18b1cb95fa881915f9642
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/basidesh.cxx2
-rw-r--r--basctl/source/basicide/moduldlg.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 58938a2cb837..db6136ba742b 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -819,7 +819,7 @@ void Shell::RemoveWindow( BaseWindow* pWindow_, bool bDestroy, bool bAllowChange
{
if ( !( pWindow_->GetStatus() & BASWIN_INRESCHEDULE ) )
{
- delete pWindow_;
+ VclPtr<BaseWindow>(pWindow_).disposeAndClear();
}
else
{
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 43967f65e0e7..62d5dae9b996 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -494,7 +494,7 @@ void OrganizeDialog::dispose()
if (m_pTabCtrl)
{
for ( sal_uInt16 i = 0; i < m_pTabCtrl->GetPageCount(); i++ )
- delete m_pTabCtrl->GetTabPage( m_pTabCtrl->GetPageId( i ) );
+ VclPtr<vcl::Window>(m_pTabCtrl->GetTabPage( m_pTabCtrl->GetPageId( i ) )).disposeAndClear();
}
m_pTabCtrl.clear();