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 --- svtools/source/uno/svtxgridcontrol.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'svtools/source/uno/svtxgridcontrol.cxx') diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 59bb09071a13..79dee627d540 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -853,7 +853,7 @@ void SVTXGridControl::setEnable( sal_Bool bEnable ) throw(css::uno::RuntimeExcep SolarMutexGuard aGuard; m_xTableModel->setEnabled( bEnable ); - vcl::Window * pWindow = GetWindow(); + VclPtr pWindow = GetWindow(); if ( pWindow ) { pWindow->Enable( bEnable ); -- cgit