tnl: Don't dereference NULL obj pointer in t_rebase_prims
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 8 Apr 2020 18:12:19 +0000 (11:12 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 13 Apr 2020 17:26:43 +0000 (10:26 -0700)
commit7a03240b635cd67f345811b86b9faf106f862ec0
treef46b7b504bed878bd63da666a10c22509ab92d14
parent2e43b32e72b2adf7ce865f56cf2647b137a5342a
tnl: Don't dereference NULL obj pointer in t_rebase_prims

Structurally the code is now similar to the handling of other
gl_buffer_object::obj pointers elsewhere in TNL.  The fixes tag is a
little bit misleading.  I think the change in that commit just exposes a
previously existing bug.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2746
Fixes: f3cce7087a5 ("mesa: don't ever bind NullBufferObj for glBindBuffer targets")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4512>
src/mesa/tnl/t_rebase.c