Signed-off-by: Sven Baars sbaars@codeweavers.com --- dlls/d3dcompiler_43/utils.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c index df39716b495..971a5bef9c7 100644 --- a/dlls/d3dcompiler_43/utils.c +++ b/dlls/d3dcompiler_43/utils.c @@ -1450,19 +1450,22 @@ struct hlsl_ir_node *add_assignment(struct list *instrs, struct hlsl_ir_node *lh struct hlsl_type *lhs_type; DWORD writemask = 0;
+ if (!assign) + { + ERR("Out of memory\n"); + return NULL; + } + lhs_type = lhs->data_type; if (lhs_type->type <= HLSL_CLASS_LAST_NUMERIC) { writemask = (1 << lhs_type->dimx) - 1;
if (!(rhs = add_implicit_conversion(instrs, rhs, lhs_type, &rhs->loc))) + { + d3dcompiler_free(assign); return NULL; - } - - if (!assign) - { - ERR("Out of memory\n"); - return NULL; + } }
while (lhs->type != HLSL_IR_LOAD)