From cf7017c89e9ca1157f8f68a4f7d6e4cca2431e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 10 Jun 2014 15:27:59 +0100 Subject: [PATCH] coverity#1169830 Unchecked dynamic_cast Change-Id: Ib4b77369d2fbe085c2eb6ad996df9db710990c3c --- chart2/source/view/main/OpenglShapeFactory.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)