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 ); }