From 78b4a1fb01af9ad3b3395a22f6e396be914b553e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 10 Nov 2016 12:53:02 +0200 Subject: update vclwidget loplugin to find ref-dropping assigment Look for places where we are accidentally assigning a returned-by-value VclPtr to a T*, which generally ends up in a use-after-free. Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9 Reviewed-on: https://gerrit.libreoffice.org/30749 Tested-by: Jenkins Reviewed-by: Noel Grandin --- canvas/source/opengl/ogl_spritecanvas.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'canvas/source/opengl/ogl_spritecanvas.cxx') diff --git a/canvas/source/opengl/ogl_spritecanvas.cxx b/canvas/source/opengl/ogl_spritecanvas.cxx index 7e6bc04c7204..c3bc92a3da7e 100644 --- a/canvas/source/opengl/ogl_spritecanvas.cxx +++ b/canvas/source/opengl/ogl_spritecanvas.cxx @@ -62,7 +62,7 @@ namespace oglcanvas uno::Reference< awt::XWindow > xParentWindow; maArguments[4] >>= xParentWindow; - vcl::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow); + VclPtr pParentWindow = VCLUnoHelper::GetWindow(xParentWindow); if( !pParentWindow ) throw lang::NoSupportException( "Parent window not VCL window, or canvas out-of-process!", nullptr); -- cgit