summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-04-20 15:03:38 -0600
committerBrian Paul <[email protected]>2009-04-21 07:27:26 -0600
commit25e3a534035e71bb319d2e11906d376734941a21 (patch)
tree0eab921c143b12d1232855ef4f4a3bf9b224feb2 /src/mesa
parente20f837f672e43671890d5f62f9814487e15531f (diff)
st: report GL_OUT_OF_MEMORY instead of asserting
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_cb_bufferobjects.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c
index ea9f73ca7b8..a94e11fff12 100644
--- a/src/mesa/state_tracker/st_cb_bufferobjects.c
+++ b/src/mesa/state_tracker/st_cb_bufferobjects.c
@@ -169,10 +169,10 @@ st_bufferobj_data(GLcontext *ctx,
st_obj->buffer = pipe_buffer_create( pipe->screen, 32, buffer_usage, size );
- /* We don't seem to have any good way of passing failure to
- * allocate up to Mesa??
- */
- assert(st_obj->buffer);
+ if (!st_obj->buffer) {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBufferDataARB");
+ return;
+ }
st_obj->size = size;