Added null pointer check

This commit is contained in:
Robert Osfield
2016-07-06 19:58:23 +01:00
parent a898f2a7e1
commit 5c5cdbabf7

View File

@@ -85,8 +85,10 @@ public:
osgAnimation::VertexInfluenceMap::iterator itMap = infMap->find((*bone)->getName());
if(itMap == infMap->end()) continue;
osgAnimation::VertexInfluence vxtInf = (*itMap).second;
osg::Vec3Array *vertices = dynamic_cast<osg::Vec3Array*>(rigGeometry->getVertexArray());
if(!vertices) continue;
osgAnimation::VertexInfluence vxtInf = (*itMap).second;
//Expand the boundingBox with each vertex
for(unsigned int j = 0; j < vxtInf.size(); j++) {