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 --- sfx2/source/inet/inettbc.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sfx2/source/inet') diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx index dbd3a513a87b..d13ad0371732 100644 --- a/sfx2/source/inet/inettbc.cxx +++ b/sfx2/source/inet/inettbc.cxx @@ -175,7 +175,7 @@ IMPL_LINK_NOARG(SfxURLToolBoxControl_Impl, OpenHdl, SvtURLBox*, void) Reference< XFrame > xFrame( xDesktop->getActiveFrame(), UNO_QUERY ); if ( xFrame.is() ) { - vcl::Window* pWin = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); + VclPtr pWin = VCLUnoHelper::GetWindow( xFrame->getContainerWindow() ); if ( pWin ) { pWin->GrabFocus(); -- cgit