mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
nir: Handle NULL in nir_copy_deref()
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
29921ee987
commit
50c24c3ff3
1 changed files with 3 additions and 0 deletions
|
|
@ -642,6 +642,9 @@ copy_deref_struct(void *mem_ctx, nir_deref_struct *deref)
|
|||
nir_deref *
|
||||
nir_copy_deref(void *mem_ctx, nir_deref *deref)
|
||||
{
|
||||
if (deref == NULL)
|
||||
return NULL;
|
||||
|
||||
switch (deref->deref_type) {
|
||||
case nir_deref_type_var:
|
||||
return ©_deref_var(mem_ctx, nir_deref_as_var(deref))->deref;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue