aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_atom_array.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_atom_array.c')
-rw-r--r--src/mesa/state_tracker/st_atom_array.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mesa/state_tracker/st_atom_array.c b/src/mesa/state_tracker/st_atom_array.c
index 21e00ff17b9..a726d06cd4a 100644
--- a/src/mesa/state_tracker/st_atom_array.c
+++ b/src/mesa/state_tracker/st_atom_array.c
@@ -405,14 +405,9 @@ st_setup_arrays(struct st_context *st,
const unsigned bufidx = (*num_vbuffers)++;
if (_mesa_is_bufferobj(binding->BufferObj)) {
- struct st_buffer_object *stobj = st_buffer_object(binding->BufferObj);
- if (!stobj || !stobj->buffer) {
- st->vertex_array_out_of_memory = true;
- return; /* out-of-memory error probably */
- }
-
/* Set the binding */
- vbuffer[bufidx].buffer.resource = stobj->buffer;
+ struct st_buffer_object *stobj = st_buffer_object(binding->BufferObj);
+ vbuffer[bufidx].buffer.resource = stobj ? stobj->buffer : NULL;
vbuffer[bufidx].is_user_buffer = false;
vbuffer[bufidx].buffer_offset = _mesa_draw_binding_offset(binding);
} else {