This fixes a crash with the piglit vbo-too-small test.
Reviewed-by: José Fonseca <jfonseca@vmware.com>
/* 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;
}
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;
}