summaryrefslogtreecommitdiff
path: root/vcl/source/window/dockwin.cxx
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 /vcl/source/window/dockwin.cxx
parent7aa921cb53eedd0a107fbe9f75365adcce4d37d9 (diff)
vclwidget: check for calling delete on subclasses of vcl::Window
Change-Id: I7fb7cf919e3f46dd03a18b1cb95fa881915f9642
Diffstat (limited to 'vcl/source/window/dockwin.cxx')
-rw-r--r--vcl/source/window/dockwin.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 6ceafc25b9c8..6cc6301730b2 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -264,14 +264,14 @@ bool DockingWindow::ImplStartDocking( const Point& rPos )
mbStartFloat = mbLastFloatMode;
// calculate FloatingBorder
- FloatingWindow* pWin;
+ VclPtr<FloatingWindow> pWin;
if ( mpFloatWin )
pWin = mpFloatWin;
else
pWin = new ImplDockFloatWin( mpImplData->mpParent, mnFloatBits, NULL );
pWin->GetBorder( mnDockLeft, mnDockTop, mnDockRight, mnDockBottom );
if ( !mpFloatWin )
- delete pWin;
+ pWin.disposeAndClear();
Point aPos = ImplOutputToFrame( Point() );
Size aSize = Window::GetOutputSizePixel();