diff --git a/src/osg/Geometry.cpp b/src/osg/Geometry.cpp index 36e167200..c1e20d094 100644 --- a/src/osg/Geometry.cpp +++ b/src/osg/Geometry.cpp @@ -201,7 +201,7 @@ void Geometry::setTexCoordArrayList(const ArrayList& arrayList) itr != _texCoordList.end(); ++itr) { - addVertexBufferObjectIfRequired(itr->get()); + if (itr->get()) addVertexBufferObjectIfRequired(itr->get()); } } } @@ -244,7 +244,7 @@ void Geometry::setVertexAttribArrayList(const ArrayList& arrayList) itr != _vertexAttribList.end(); ++itr) { - addVertexBufferObjectIfRequired(itr->get()); + if (itr->get()) addVertexBufferObjectIfRequired(itr->get()); } } }