diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-14 10:07:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-14 10:59:48 +0100 |
commit | 72dff7984a26788d8c90f9dd63a1529931376d7f (patch) | |
tree | 83c859fb2accd42cc351d7e3720006ee3391c49b /svx/source/form | |
parent | 36e2468151edc4dab1753ed2e41edf2a2867649b (diff) |
coverity#735865 Dereference after null check
Change-Id: I6ebe8a0fb2e63b83406434d5fce0af8994f12458
Diffstat (limited to 'svx/source/form')
-rw-r--r-- | svx/source/form/filtnav.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index fe2de5c0d20d..37b37c8a1039 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -176,10 +176,10 @@ FmFilterItem* FmFilterItems::Find( const ::sal_Int32 _nFilterComponentIndex ) co ++i ) { - FmFilterItem* pCondition = dynamic_cast<FmFilterItem*>( *i ); - DBG_ASSERT( pCondition, "FmFilterItems::Find: Wrong element in container!" ); - if ( _nFilterComponentIndex == pCondition->GetComponentIndex() ) - return pCondition; + FmFilterData* pData = *i; + FmFilterItem& rCondition = dynamic_cast<FmFilterItem&>(*pData); + if ( _nFilterComponentIndex == rCondition.GetComponentIndex() ) + return &rCondition; } return NULL; } |