mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-22 20:40:39 +01:00
spirv: Assert that vtn_pointer_to_deref() doesn't return NULL
There are a few things that could cause us to return NULL here and we should just fail to parse the SPIR-V if that ever happens instead of crashing when someone tries to access it. Reviewed-by: Caio Oliveira <caio.oliveira@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36427>
This commit is contained in:
parent
8a993cf900
commit
d1be63c355
1 changed files with 2 additions and 0 deletions
|
|
@ -524,6 +524,8 @@ vtn_pointer_to_deref(struct vtn_builder *b, struct vtn_pointer *ptr)
|
|||
ptr = vtn_pointer_dereference(b, ptr, &chain);
|
||||
}
|
||||
|
||||
vtn_assert(ptr->deref != NULL);
|
||||
|
||||
return ptr->deref;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue