st/mesa: check for missing VBO in setup_interleaved_attribs()

This fixes a crash with the piglit vbo-too-small test.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
This commit is contained in:
Brian Paul
2011-11-14 08:27:13 -07:00
parent 438d7ac146
commit d0836eda5e
+3 -3
View File
@@ -436,8 +436,8 @@ setup_interleaved_attribs(struct gl_context *ctx,
/* all interleaved arrays in a VBO */
struct st_buffer_object *stobj = st_buffer_object(bufobj);
if (!stobj) {
/* probably out of memory */
if (!stobj || !stobj->buffer) {
/* probably out of memory (or zero-sized buffer) */
return GL_FALSE;
}
@@ -505,7 +505,7 @@ setup_non_interleaved_attribs(struct gl_context *ctx,
struct st_buffer_object *stobj = st_buffer_object(bufobj);
if (!stobj || !stobj->buffer) {
/* probably ran out of memory */
/* probably out of memory (or zero-sized buffer) */
return GL_FALSE;
}