summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-06-15 15:36:06 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-06-15 15:36:06 +0000
commit2d77b25c27cdb49b1f3f6eda4643eaeaf230b9a2 (patch)
tree8f6f315086c5aba1e6c340a4bb06cdafe4dc97a6 /src
parent9960ddcd66b9c2c6f4b12fc7db7326ba83d65956 (diff)
minor clean-ups
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/arrayobj.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/mesa/main/arrayobj.c b/src/mesa/main/arrayobj.c
index 1fbcb9961f..852b9aaee9 100644
--- a/src/mesa/main/arrayobj.c
+++ b/src/mesa/main/arrayobj.c
@@ -69,7 +69,7 @@ lookup_arrayobj(GLcontext *ctx, GLuint id)
/**
- * Allocate and initialize a new array object.
+ * Allocate and initialize a new vertex array object.
*
* This function is intended to be called via
* \c dd_function_table::NewArrayObject.
@@ -77,12 +77,9 @@ lookup_arrayobj(GLcontext *ctx, GLuint id)
struct gl_array_object *
_mesa_new_array_object( GLcontext *ctx, GLuint name )
{
- struct gl_array_object *obj;
-
- (void) ctx;
-
- obj = MALLOC_STRUCT(gl_array_object);
- _mesa_initialize_array_object(ctx, obj, name);
+ struct gl_array_object *obj = MALLOC_STRUCT(gl_array_object);
+ if (obj)
+ _mesa_initialize_array_object(ctx, obj, name);
return obj;
}
@@ -97,7 +94,6 @@ void
_mesa_delete_array_object( GLcontext *ctx, struct gl_array_object *obj )
{
(void) ctx;
-
_mesa_free(obj);
}
@@ -177,7 +173,6 @@ _mesa_initialize_array_object( GLcontext *ctx,
obj->VertexAttrib[i].Flags = CA_CLIENT_DATA;
}
-
#if FEATURE_ARB_vertex_buffer_object
/* Vertex array buffers */
obj->Vertex.BufferObj = ctx->Array.NullBufferObj;