diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx index 16f21553614d..a340b01df232 100644 --- a/chart2/source/view/main/OpenglShapeFactory.cxx +++ b/chart2/source/view/main/OpenglShapeFactory.cxx @@ -449,9 +449,8 @@ uno::Reference< drawing::XShape > void OpenglShapeFactory::render(uno::Reference< drawing::XShapes > xRootShape) { - dummy::DummyChart* pChart = dynamic_cast(xRootShape.get()); - assert(pChart); - pChart->render(); + dummy::DummyChart& rChart = dynamic_cast(*xRootShape.get()); + rChart.render(); } bool OpenglShapeFactory::preRender(OpenGLWindow* pWindow)