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 /sd/source/ui/framework/factories/FullScreenPane.cxx | |
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 'sd/source/ui/framework/factories/FullScreenPane.cxx')
-rw-r--r-- | sd/source/ui/framework/factories/FullScreenPane.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx index 941d938282a3..4181ba3c7b84 100644 --- a/sd/source/ui/framework/factories/FullScreenPane.cxx +++ b/sd/source/ui/framework/factories/FullScreenPane.cxx @@ -193,13 +193,13 @@ IMPL_LINK(FullScreenPane, WindowEventHandler, VclWindowEvent&, rEvent, void) Reference<rendering::XCanvas> FullScreenPane::CreateCanvas() throw (RuntimeException) { - vcl::Window* pWindow = VCLUnoHelper::GetWindow(mxWindow); - if (pWindow != nullptr) + VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow(mxWindow); + if (pWindow) { Sequence<Any> aArg (5); // common: first any is VCL pointer to window (for VCL canvas) - aArg[0] = makeAny(reinterpret_cast<sal_Int64>(pWindow)); + aArg[0] = makeAny(reinterpret_cast<sal_Int64>(pWindow.get())); aArg[1] = Any(); aArg[2] = makeAny(css::awt::Rectangle()); aArg[3] = makeAny(false); |