replace _mesa_logbase2 with util_logbase2
[mesa.git] / src / mesa / state_tracker / st_atom_storagebuf.c
index b12c9164464d1446c00bd19cd4fe8b9bd47e915f..2c5d4885841faac03b4ab9bb1fae87b79cd7dbde 100644 (file)
@@ -58,7 +58,7 @@ st_bind_ssbos(struct st_context *st, struct gl_program *prog,
             prog->sh.ShaderStorageBlocks[i]->Binding];
       st_obj = st_buffer_object(binding->BufferObject);
 
-      sb->buffer = st_obj->buffer;
+      sb->buffer = st_obj ? st_obj->buffer : NULL;
 
       if (sb->buffer) {
          sb->buffer_offset = binding->Offset;