X3DImporter: fix coverity finding.

pull/1302/head
Kim Kulling 2017-05-24 21:04:35 +02:00
parent b84de79219
commit ec496a5833
1 changed files with 3 additions and 0 deletions

View File

@ -504,6 +504,9 @@ void X3DImporter::Postprocess_BuildMesh(const CX3DImporter_NodeElement& pNodeEle
// copy additional information from children // copy additional information from children
for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++) for(std::list<CX3DImporter_NodeElement*>::iterator ch_it = tnemesh.Child.begin(); ch_it != tnemesh.Child.end(); ch_it++)
{ {
if ( nullptr == *pMesh ) {
break;
}
if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color) if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_Color)
MeshGeometry_AddColor(**pMesh, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value,tnemesh.ColorPerVertex); MeshGeometry_AddColor(**pMesh, ((CX3DImporter_NodeElement_Color*)*ch_it)->Value,tnemesh.ColorPerVertex);
else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA) else if((*ch_it)->Type == CX3DImporter_NodeElement::ENET_ColorRGBA)