diff --git a/src/osg/VertexArrayState.cpp b/src/osg/VertexArrayState.cpp index 8b4092eb1..99861e4ef 100644 --- a/src/osg/VertexArrayState.cpp +++ b/src/osg/VertexArrayState.cpp @@ -438,7 +438,7 @@ struct VertexAttribArrayDispatch : public VertexArrayState::ArrayDispatch inline void callVertexAttribPointer(GLExtensions* ext, const osg::Array* new_array, const GLvoid * ptr) { - if (array->getPreserveDataType()) + if (new_array->getPreserveDataType()) { if (new_array->getDataType()==GL_FLOAT) ext->glVertexAttribPointer(static_cast(unit), new_array->getDataSize(), new_array->getDataType(), new_array->getNormalize(), 0, ptr);