On 19 October 2015 at 19:07, Riccardo Bortolato rikyz619@gmail.com wrote:
- if (!(sub_resource = wined3d_texture_get_sub_resource(dst->wined3d_texture, dst->sub_resource_idx)))
goto done;
This should never fail.
Alright, I will remove the checks even I thought we were checking this everytime we call it regardless it can fail or not (plus it seems somehow harmless to me).
Ciao, Riccardo
2015-10-20 16:36 GMT+02:00 Henri Verbeet hverbeet@gmail.com:
On 19 October 2015 at 19:07, Riccardo Bortolato rikyz619@gmail.com wrote:
- if (!(sub_resource = wined3d_texture_get_sub_resource(dst->wined3d_texture, dst->sub_resource_idx)))
goto done;
This should never fail.
On 20 October 2015 at 16:48, Riccardo Bortolato rikyz619@gmail.com wrote:
Alright, I will remove the checks even I thought we were checking this everytime we call it regardless it can fail or not (plus it seems somehow harmless to me).
It's mostly harmless, though if it ever did fail for some reason, it would be better to crash than to return a failure to the application. We check the return if the index comes from outside the dll, we don't if it's known to be valid.