coverity#1209591 Unchecked dynamic_cast

Change-Id: Id9d014d01d4c2da2d2c421893ba49a4b2fddacc0
This commit is contained in:
Caolán McNamara
2014-05-07 11:35:12 +01:00
parent 5314bb664c
commit 439d6a07f7

View File

@@ -110,8 +110,9 @@ IOpenGLRenderer* getRenderer(const uno::Reference< drawing::XDrawPage>& xDrawPag
xProp->getPropertyValue( UNO_NAME_MISC_OBJ_NAME ) >>= aRet;
if( aRet.equals("com.sun.star.chart2.shapes") )
{
IOpenGLRenderer* pRenderer = dynamic_cast<SvxOpenGLObject*>(xShape.get())->getRenderer();
if(pRenderer)
SvxOpenGLObject* pGLObj = dynamic_cast<SvxOpenGLObject*>(xShape.get());
IOpenGLRenderer* pRenderer = pGLObj ? pGLObj->getRenderer() : NULL;
if (pRenderer)
return pRenderer;
}
}