From 3be951f27989a446b2c5bab807cd12029f07cc23 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 16 Aug 2016 16:51:41 +0100 Subject: [PATCH] Fixed crash when using vertex attribute arrays --- src/osg/VertexArrayState.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);