From 0854b7e972eaea1986aa956d4dffa2d6ad541b62 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 10 Jun 2009 13:45:01 -0600 Subject: [PATCH] mesa: use _mesa_reference_buffer_object() in a few places --- src/mesa/main/bufferobj.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index a49da3d3b58..c04fa691154 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -470,11 +470,15 @@ _mesa_copy_buffer_subdata(GLcontext *ctx, void _mesa_init_buffer_objects( GLcontext *ctx ) { - ctx->Array.ArrayBufferObj = ctx->Shared->NullBufferObj; - ctx->Array.ElementArrayBufferObj = ctx->Shared->NullBufferObj; - - ctx->CopyReadBuffer = ctx->Shared->NullBufferObj; - ctx->CopyWriteBuffer = ctx->Shared->NullBufferObj; + _mesa_reference_buffer_object(ctx, &ctx->Array.ArrayBufferObj, + ctx->Shared->NullBufferObj); + _mesa_reference_buffer_object(ctx, &ctx->Array.ElementArrayBufferObj, + ctx->Shared->NullBufferObj); + + _mesa_reference_buffer_object(ctx, &ctx->CopyReadBuffer, + ctx->Shared->NullBufferObj); + _mesa_reference_buffer_object(ctx, &ctx->CopyWriteBuffer, + ctx->Shared->NullBufferObj); } -- 2.30.2