vkd3d-shader/hlsl: Handle nodes with NULL data types in hlsl_replace_node().

This commit is contained in:
Shaun Ren
2025-05-14 16:04:01 -04:00
committed by Henri Verbeet
parent 3bf232e841
commit 84a0a8ae86
Notes: Henri Verbeet 2025-06-24 16:31:45 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1553

View File

@@ -4124,7 +4124,7 @@ void hlsl_replace_node(struct hlsl_ir_node *old, struct hlsl_ir_node *new)
const struct hlsl_type *old_type = old->data_type, *new_type = new->data_type; const struct hlsl_type *old_type = old->data_type, *new_type = new->data_type;
struct hlsl_src *src, *next; struct hlsl_src *src, *next;
if (hlsl_is_numeric_type(old_type)) if (old_type && hlsl_is_numeric_type(old_type))
{ {
VKD3D_ASSERT(hlsl_is_numeric_type(new_type)); VKD3D_ASSERT(hlsl_is_numeric_type(new_type));
VKD3D_ASSERT(old_type->e.numeric.dimx == new_type->e.numeric.dimx); VKD3D_ASSERT(old_type->e.numeric.dimx == new_type->e.numeric.dimx);