summaryrefslogtreecommitdiff
path: root/sfx2/source/appl
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 /sfx2/source/appl
parent7aa921cb53eedd0a107fbe9f75365adcce4d37d9 (diff)
vclwidget: check for calling delete on subclasses of vcl::Window
Change-Id: I7fb7cf919e3f46dd03a18b1cb95fa881915f9642
Diffstat (limited to 'sfx2/source/appl')
-rw-r--r--sfx2/source/appl/sfxhelp.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 71e9ed519f8f..246248da3ae9 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -402,8 +402,8 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame2 >& rHelpTask ,
// create all internal windows and sub frames ...
Reference< ::com::sun::star::awt::XWindow > xParentWindow = xHelpTask->getContainerWindow();
- vcl::Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow );
- SfxHelpWindow_Impl* pHelpWindow = new SfxHelpWindow_Impl( xHelpTask, pParentWindow, WB_DOCKBORDER );
+ vcl::Window* pParentWindow = VCLUnoHelper::GetWindow( xParentWindow );
+ VclPtr<SfxHelpWindow_Impl> pHelpWindow = new SfxHelpWindow_Impl( xHelpTask, pParentWindow, WB_DOCKBORDER );
Reference< ::com::sun::star::awt::XWindow > xHelpWindow = VCLUnoHelper::GetInterface( pHelpWindow );
Reference< XFrame > xHelpContent;
@@ -429,7 +429,7 @@ SfxHelpWindow_Impl* impl_createHelp(Reference< XFrame2 >& rHelpTask ,
if (!xHelpContent.is())
{
- delete pHelpWindow;
+ pHelpWindow.disposeAndClear();
return NULL;
}