12 Dec
2022
12 Dec
'22
4:28 p.m.
Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/effect.c:
- if (effect->params.count) + if (FAILED(hr = d3dx_init_parameters_store(&effect->params, params_count))) { - effect->params.parameters = heap_alloc_zero(sizeof(*effect->params.parameters) * effect->params.count); - if (!effect->params.parameters) - { - ERR("Out of memory.\n"); - hr = E_OUTOFMEMORY; - goto err_out; - } + hr = E_OUTOFMEMORY; + goto err_out; + }
+ if (effect->params.count) + { You can just get rid of the if entirely at this point.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1682#note_19494