From 5c5cdbabf774a2c5669fe8b895c0f455dd6332f1 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 6 Jul 2016 19:58:23 +0100 Subject: [PATCH] Added null pointer check --- src/osgPlugins/gles/AABBonBoneVisitor | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/gles/AABBonBoneVisitor b/src/osgPlugins/gles/AABBonBoneVisitor index b2857c7af..a8f3a7396 100644 --- a/src/osgPlugins/gles/AABBonBoneVisitor +++ b/src/osgPlugins/gles/AABBonBoneVisitor @@ -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(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++) {