summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_save.c
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2018-02-25 18:01:07 +0100
committerMathias Fröhlich <[email protected]>2018-03-01 04:06:23 +0100
commit19a0f27a491ae7cb3abceda8e60b9944cd273558 (patch)
tree94fa564dac7b79a84c0a990dd2495e9fc869ece0 /src/mesa/vbo/vbo_save.c
parent6e410270ee73f21c4363c8d9cc8f4eef4bf949b1 (diff)
vbo: Remove reference to the vertex_store from the dlist node.
Since we now store a set of VAOs in the display list, use these object to get the reference to the VBO in several places. Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
Diffstat (limited to 'src/mesa/vbo/vbo_save.c')
-rw-r--r--src/mesa/vbo/vbo_save.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mesa/vbo/vbo_save.c b/src/mesa/vbo/vbo_save.c
index f106cf279ad..361964195c3 100644
--- a/src/mesa/vbo/vbo_save.c
+++ b/src/mesa/vbo/vbo_save.c
@@ -65,12 +65,11 @@ void vbo_save_destroy( struct gl_context *ctx )
free(save->prim_store);
save->prim_store = NULL;
}
- if ( --save->vertex_store->refcount == 0 ) {
- _mesa_reference_buffer_object(ctx,
- &save->vertex_store->bufferobj, NULL);
- free(save->vertex_store);
- save->vertex_store = NULL;
- }
+ }
+ if (save->vertex_store) {
+ _mesa_reference_buffer_object(ctx, &save->vertex_store->bufferobj, NULL);
+ free(save->vertex_store);
+ save->vertex_store = NULL;
}
}