aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/varray.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/varray.c')
-rw-r--r--src/mesa/main/varray.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index c0b7bcfabe9..52f8c8cef95 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -25,6 +25,7 @@
#include "glheader.h"
#include "imports.h"
+#include "bufferobj.h"
#include "context.h"
#include "enable.h"
#include "enums.h"
@@ -59,6 +60,7 @@ update_array(GLcontext *ctx, struct gl_client_array *array,
#if FEATURE_ARB_vertex_buffer_object
array->BufferObj->RefCount--;
if (array->BufferObj->RefCount <= 0) {
+ _mesa_remove_buffer_object( ctx, array->BufferObj );
(*ctx->Driver.DeleteBuffer)( ctx, array->BufferObj );
}
array->BufferObj = ctx->Array.ArrayBufferObj;