From 164c89b5f463e1bb50bd409b51c0657f694bea5f Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 21 Apr 2014 11:43:44 +0200 Subject: coverity#735765 Unchecked dynamic_cast Change-Id: I4a1bf64267d36ff4b3b7cf0ba2cc23c52ec2d36e --- oox/source/ppt/slidepersist.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx index 6ac8e0dd09ea..b13c5f7eb889 100644 --- a/oox/source/ppt/slidepersist.cxx +++ b/oox/source/ppt/slidepersist.cxx @@ -305,6 +305,8 @@ void SlidePersist::hideShapesAsMasterShapes() std::vector< oox::drawingml::ShapePtr >::iterator aChildIter( rChildren.begin() ); while( aChildIter != rChildren.end() ) { PPTShape* pPPTShape = dynamic_cast< PPTShape* >( (*aChildIter++).get() ); + if (!pPPTShape) + continue; OSL_TRACE("hide shape with id: %s", OUStringToOString(pPPTShape->getId(), RTL_TEXTENCODING_UTF8 ).getStr()); pPPTShape->setHiddenMasterShape( true ); } -- cgit