diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-10 12:53:02 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-11-11 06:55:41 +0000 |
commit | 78b4a1fb01af9ad3b3395a22f6e396be914b553e (patch) | |
tree | 846fdaea907a70fdc274a1e76642ed5e06622c0d /desktop | |
parent | 071e23fee07b92b8f07800cda3ca7e66afe818ae (diff) |
update vclwidget loplugin to find ref-dropping assigment
Look for places where we are accidentally assigning a returned-by-value
VclPtr<T> 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 <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index badeca5cc707..7abfdda84c89 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2391,7 +2391,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) xStartModule->attachFrame(xBackingFrame); xContainerWindow->setVisible(true); - vcl::Window* pCompWindow = VCLUnoHelper::GetWindow(xBackingFrame->getComponentWindow()); + VclPtr<vcl::Window> pCompWindow = VCLUnoHelper::GetWindow(xBackingFrame->getComponentWindow()); if (pCompWindow) pCompWindow->Update(); } @@ -2606,7 +2606,7 @@ void Desktop::ShowBackingComponent(Desktop * progress) // set the WB_EXT_DOCUMENT style. Normally, this is done by the TaskCreator service when a "_blank" // frame/window is created. Since we do not use the TaskCreator here, we need to mimic its behavior, // otherwise documents loaded into this frame will later on miss functionality depending on the style. - vcl::Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); + VclPtr<vcl::Window> pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow ); SAL_WARN_IF( !pContainerWindow, "desktop.app", "Desktop::Main: no implementation access to the frame's container window!" ); pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WB_EXT_DOCUMENT ); if (progress != nullptr) |