coverity#1169830 Unchecked dynamic_cast

Change-Id: Ib4b77369d2fbe085c2eb6ad996df9db710990c3c
This commit is contained in:
Caolán McNamara
2014-06-10 15:27:59 +01:00
parent 3b70067fcc
commit cf7017c89e

View File

@@ -449,9 +449,8 @@ uno::Reference< drawing::XShape >
void OpenglShapeFactory::render(uno::Reference< drawing::XShapes > xRootShape) void OpenglShapeFactory::render(uno::Reference< drawing::XShapes > xRootShape)
{ {
dummy::DummyChart* pChart = dynamic_cast<dummy::DummyChart*>(xRootShape.get()); dummy::DummyChart& rChart = dynamic_cast<dummy::DummyChart&>(*xRootShape.get());
assert(pChart); rChart.render();
pChart->render();
} }
bool OpenglShapeFactory::preRender(OpenGLWindow* pWindow) bool OpenglShapeFactory::preRender(OpenGLWindow* pWindow)