Kaydet (Commit) d31a216b authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#705814 Dereference before null check

Change-Id: Ib5eb5a7058098f7222b1597e60ddc84786403805
üst 40c78e72
...@@ -875,11 +875,11 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper ...@@ -875,11 +875,11 @@ void OInterfaceContainer::implInsert(sal_Int32 _nIndex, const Reference< XProper
if ( bHandleVbaEvents ) if ( bHandleVbaEvents )
{ {
Reference< XEventAttacherManager > xMgr ( pElementMetaData->xInterface, UNO_QUERY ); Reference< XEventAttacherManager > xMgr ( pElementMetaData->xInterface, UNO_QUERY );
if ( xMgr.is() ) OInterfaceContainer* pIfcMgr = xMgr.is() ? dynamic_cast<OInterfaceContainer*>(xMgr.get()) : NULL;
if (pIfcMgr)
{ {
OInterfaceContainer* pIfcMgr = dynamic_cast< OInterfaceContainer* >( xMgr.get() );
sal_Int32 nLen = pIfcMgr->getCount(); sal_Int32 nLen = pIfcMgr->getCount();
for ( sal_Int32 i = 0; (i < nLen) && pIfcMgr ; ++i ) for (sal_Int32 i = 0; i < nLen; ++i)
{ {
// add fake events to the control at index i // add fake events to the control at index i
pIfcMgr->impl_addVbEvents_nolck_nothrow( i ); pIfcMgr->impl_addVbEvents_nolck_nothrow( i );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment