coverity#1325250 Unchecked dynamic_cast

Change-Id: Id52cad11d2ca4ef42a31c0905ee123ccd53e0677
This commit is contained in:
Caolán McNamara
2015-10-01 14:12:06 +01:00
parent 792d507eec
commit e31cd8f3ae

View File

@@ -141,9 +141,8 @@ SbxVariable* getDefaultProp( SbxVariable* pRef )
SbxBase* pObjVarObj = pRef->GetObject(); SbxBase* pObjVarObj = pRef->GetObject();
pObj = dynamic_cast<SbxObject*>( pObjVarObj ); pObj = dynamic_cast<SbxObject*>( pObjVarObj );
} }
if ( pObj && 0 != dynamic_cast<const SbUnoObject*>( pObj) ) if (SbUnoObject* pUnoObj = dynamic_cast<SbUnoObject*>(pObj))
{ {
SbUnoObject* pUnoObj = dynamic_cast<SbUnoObject*>( pObj );
pDefaultProp = pUnoObj->GetDfltProperty(); pDefaultProp = pUnoObj->GetDfltProperty();
} }
} }