diff --git a/src/osgTerrain/GeometryPool.cpp b/src/osgTerrain/GeometryPool.cpp index e028aa99d..c69781f44 100644 --- a/src/osgTerrain/GeometryPool.cpp +++ b/src/osgTerrain/GeometryPool.cpp @@ -846,7 +846,7 @@ void SharedGeometry::compileGLObjects(osg::RenderInfo& renderInfo) const osg::BufferObject* ebo = _drawElements->getElementBufferObject(); osg::GLBufferObject* ebo_glBufferObject = ebo->getOrCreateGLBufferObject(contextID); - if (ebo_glBufferObject && vbo_glBufferObject->isDirty()) + if (ebo_glBufferObject && ebo_glBufferObject->isDirty()) { // OSG_NOTICE<<"Compile buffer "<compileBuffer();