Commit 2c34b49d authored by Timothy Arceri's avatar Timothy Arceri

mesa: check that buffer object is not NULL before initializing it

Reviewed-by: Samuel Pitoiset's avatarSamuel Pitoiset <>
parent 6ee3323d
......@@ -443,11 +443,10 @@ convert_clear_buffer_data(struct gl_context *ctx,
static struct gl_buffer_object *
_mesa_new_buffer_object(struct gl_context *ctx, GLuint name)
struct gl_buffer_object *obj;
(void) ctx;
struct gl_buffer_object *obj = MALLOC_STRUCT(gl_buffer_object);
if (!obj)
return NULL;
obj = MALLOC_STRUCT(gl_buffer_object);
_mesa_initialize_buffer_object(ctx, obj, name);
return obj;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment