From d348f398830e523cc07d3047e978be12d6327114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 7 May 2014 11:35:48 +0100 Subject: [PATCH] coverity#1209592 Unchecked dynamic_cast Change-Id: Id9ac29ec88a98e626a1ecfb364e474b2a11a8004 --- chart2/source/view/main/OpenglShapeFactory.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx index 2ca81cad36cc..56beb5e163d9 100644 --- a/chart2/source/view/main/OpenglShapeFactory.cxx +++ b/chart2/source/view/main/OpenglShapeFactory.cxx @@ -154,7 +154,8 @@ uno::Reference< drawing::XShapes > OpenglShapeFactory::getOrCreateChartRootShape xPropSet->setPropertyValue( UNO_NAME_MISC_OBJ_NAME, aName ); SvxOpenGLObject* pObj = dynamic_cast(xTarget.get()); - pObj->setRenderer(new OpenGLChartAdapter(xChart)); + if (pObj) + pObj->setRenderer(new OpenGLChartAdapter(xChart)); xRet = getChartShape( xDrawPage ); }