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

coverity#1325250 Unchecked dynamic_cast

Change-Id: Id52cad11d2ca4ef42a31c0905ee123ccd53e0677
üst 792d507e
...@@ -135,15 +135,14 @@ SbxVariable* getDefaultProp( SbxVariable* pRef ) ...@@ -135,15 +135,14 @@ SbxVariable* getDefaultProp( SbxVariable* pRef )
SbxVariable* pDefaultProp = NULL; SbxVariable* pDefaultProp = NULL;
if ( pRef->GetType() == SbxOBJECT ) if ( pRef->GetType() == SbxOBJECT )
{ {
SbxObject* pObj = dynamic_cast<SbxObject*>( pRef ); SbxObject* pObj = dynamic_cast<SbxObject*>(pRef);
if ( !pObj ) if (!pObj)
{ {
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();
} }
} }
......
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