diff options
Diffstat (limited to 'src/mesa/pipe/pipebuffer/pb_buffer_malloc.c')
-rw-r--r-- | src/mesa/pipe/pipebuffer/pb_buffer_malloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c b/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c index f0ff1d347e..fc83a00f36 100644 --- a/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c +++ b/src/mesa/pipe/pipebuffer/pb_buffer_malloc.c @@ -114,10 +114,11 @@ pb_malloc_buffer_create(size_t size, if(!buf) return NULL; - buf->base.vtbl = &malloc_buffer_vtbl; + buf->base.base.refcount = 1; buf->base.base.alignment = desc->alignment; buf->base.base.usage = desc->usage; buf->base.base.size = size; + buf->base.vtbl = &malloc_buffer_vtbl; buf->data = align_malloc(size, desc->alignment < sizeof(void*) ? sizeof(void*) : desc->alignment); if(!buf->data) { |