From: Brian Paul Date: Mon, 20 Apr 2009 21:03:38 +0000 (-0600) Subject: st: report GL_OUT_OF_MEMORY instead of asserting X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=25e3a534035e71bb319d2e11906d376734941a21;p=mesa.git st: report GL_OUT_OF_MEMORY instead of asserting --- 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;