vkd3d-shader/hlsl: Don't dereference a NULL offset_node in hlsl_offset_from_deref().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-09-23 16:47:02 -05:00 committed by Alexandre Julliard
parent 6765c1dfb4
commit 14e9a1ba1c

View File

@ -1201,7 +1201,7 @@ unsigned int hlsl_offset_from_deref(const struct hlsl_deref *deref)
if (offset_node->type != HLSL_IR_CONSTANT)
{
FIXME("Dereference with non-constant offset of type %s.\n", hlsl_node_type_to_string(offset_node->type));
offset_node = NULL;
return 0;
}
return hlsl_ir_constant(offset_node)->value[0].u;