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 /accessibility/source/extended/accessibleiconchoicectrl.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 'accessibility/source/extended/accessibleiconchoicectrl.cxx')
-rw-r--r-- | accessibility/source/extended/accessibleiconchoicectrl.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx index cacf65c5cf3b..194e52a870c0 100644 --- a/accessibility/source/extended/accessibleiconchoicectrl.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx @@ -90,7 +90,7 @@ namespace accessibility } case VCLEVENT_WINDOW_GETFOCUS : { - SvtIconChoiceCtrl* pCtrl = getCtrl(); + VclPtr<SvtIconChoiceCtrl> pCtrl = getCtrl(); if ( pCtrl && pCtrl->HasFocus() ) { SvxIconChoiceCtrlEntry* pEntry = static_cast< SvxIconChoiceCtrlEntry* >( rVclWindowEvent.GetData() ); @@ -167,7 +167,7 @@ namespace accessibility ::comphelper::OExternalLockGuard aGuard( this ); ensureAlive(); - SvtIconChoiceCtrl* pCtrl = getCtrl(); + VclPtr<SvtIconChoiceCtrl> pCtrl = getCtrl(); SvxIconChoiceCtrlEntry* pEntry = pCtrl->GetEntry(i); if ( !pEntry ) throw RuntimeException(); @@ -217,7 +217,7 @@ namespace accessibility ensureAlive(); - SvtIconChoiceCtrl* pCtrl = getCtrl(); + VclPtr<SvtIconChoiceCtrl> pCtrl = getCtrl(); SvxIconChoiceCtrlEntry* pEntry = pCtrl->GetEntry( nChildIndex ); if ( !pEntry ) throw IndexOutOfBoundsException(); @@ -231,7 +231,7 @@ namespace accessibility ensureAlive(); - SvtIconChoiceCtrl* pCtrl = getCtrl(); + VclPtr<SvtIconChoiceCtrl> pCtrl = getCtrl(); SvxIconChoiceCtrlEntry* pEntry = pCtrl->GetEntry( nChildIndex ); if ( !pEntry ) throw IndexOutOfBoundsException(); @@ -253,7 +253,7 @@ namespace accessibility ensureAlive(); - SvtIconChoiceCtrl* pCtrl = getCtrl(); + VclPtr<SvtIconChoiceCtrl> pCtrl = getCtrl(); sal_Int32 nCount = pCtrl->GetEntryCount(); for ( sal_Int32 i = 0; i < nCount; ++i ) { @@ -270,7 +270,7 @@ namespace accessibility ensureAlive(); sal_Int32 nSelCount = 0; - SvtIconChoiceCtrl* pCtrl = getCtrl(); + VclPtr<SvtIconChoiceCtrl> pCtrl = getCtrl(); sal_Int32 nCount = pCtrl->GetEntryCount(); for ( sal_Int32 i = 0; i < nCount; ++i ) { @@ -293,7 +293,7 @@ namespace accessibility Reference< XAccessible > xChild; sal_Int32 nSelCount = 0; - SvtIconChoiceCtrl* pCtrl = getCtrl(); + VclPtr<SvtIconChoiceCtrl> pCtrl = getCtrl(); sal_Int32 nCount = pCtrl->GetEntryCount(); for ( sal_Int32 i = 0; i < nCount; ++i ) { @@ -322,7 +322,7 @@ namespace accessibility Reference< XAccessible > xChild; sal_Int32 nSelCount = 0; - SvtIconChoiceCtrl* pCtrl = getCtrl(); + VclPtr<SvtIconChoiceCtrl> pCtrl = getCtrl(); sal_Int32 nCount = pCtrl->GetEntryCount(); bool bFound = false; for ( sal_Int32 i = 0; i < nCount; ++i ) |