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 /chart2/source/controller/accessibility/AccessibleChartView.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 'chart2/source/controller/accessibility/AccessibleChartView.cxx')
-rw-r--r-- | chart2/source/controller/accessibility/AccessibleChartView.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx index f24951371df6..823c3b5872fc 100644 --- a/chart2/source/controller/accessibility/AccessibleChartView.cxx +++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx @@ -74,7 +74,7 @@ awt::Rectangle AccessibleChartView::GetWindowPosSize() const awt::Rectangle aBBox( xWindow->getPosSize() ); - vcl::Window* pWindow( VCLUnoHelper::GetWindow( GetInfo().m_xWindow )); + VclPtr<vcl::Window> pWindow( VCLUnoHelper::GetWindow( GetInfo().m_xWindow )); if( pWindow ) { SolarMutexGuard aSolarGuard; @@ -322,7 +322,7 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments aAccInfo.m_pParent = nullptr; aAccInfo.m_spObjectHierarchy = m_spObjectHierarchy; aAccInfo.m_pSdrView = m_pSdrView; - vcl::Window* pWindow = VCLUnoHelper::GetWindow( m_xWindow ); + VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( m_xWindow ); if ( m_pViewForwarder ) { delete m_pViewForwarder; |