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 /sw/source/uibase/sidebar | |
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 'sw/source/uibase/sidebar')
-rw-r--r-- | sw/source/uibase/sidebar/SwPanelFactory.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx b/sw/source/uibase/sidebar/SwPanelFactory.cxx index 985000c491f5..d1d85d1d5f22 100644 --- a/sw/source/uibase/sidebar/SwPanelFactory.cxx +++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx @@ -109,7 +109,7 @@ Reference<ui::XUIElement> SAL_CALL SwPanelFactory::createUIElement ( const sal_uInt64 nBindingsValue (aArguments.getOrDefault("SfxBindings", sal_uInt64(0))); SfxBindings* pBindings = reinterpret_cast<SfxBindings*>(nBindingsValue); - vcl::Window* pParentWindow = VCLUnoHelper::GetWindow(xParentWindow); + VclPtr<vcl::Window> pParentWindow = VCLUnoHelper::GetWindow(xParentWindow); if ( ! xParentWindow.is() || pParentWindow==nullptr) throw RuntimeException( "PanelFactory::createUIElement called without ParentWindow", |