summaryrefslogtreecommitdiffstats
path: root/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-11-10 12:53:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-11-11 06:55:41 +0000
commit78b4a1fb01af9ad3b3395a22f6e396be914b553e (patch)
tree846fdaea907a70fdc274a1e76642ed5e06622c0d /svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
parentadd move operators for VclPtr (diff)
downloadcore-78b4a1fb01af9ad3b3395a22f6e396be914b553e.tar.gz
core-78b4a1fb01af9ad3b3395a22f6e396be914b553e.zip
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 'svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx')
-rw-r--r--svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx b/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
index aafb7df1bb73..2430b5420b7b 100644
--- a/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
+++ b/svx/source/accessibility/AccessibleSvxFindReplaceDialog.cxx
@@ -39,10 +39,10 @@ VCLXAccessibleSvxFindReplaceDialog::~VCLXAccessibleSvxFindReplaceDialog()
void VCLXAccessibleSvxFindReplaceDialog::FillAccessibleRelationSet( utl::AccessibleRelationSetHelper& rRelationSet )
{
VCLXAccessibleComponent::FillAccessibleRelationSet( rRelationSet );
- vcl::Window* pDlg = GetWindow();
+ VclPtr<vcl::Window> pDlg = GetWindow();
if ( pDlg )
{
- SvxSearchDialog* pSrchDlg = static_cast<SvxSearchDialog*>( pDlg );
+ SvxSearchDialog* pSrchDlg = static_cast<SvxSearchDialog*>( pDlg.get() );
vcl::Window* pDocWin = pSrchDlg->GetDocWin();
if ( !pDocWin )
{