Matteo Bruni : d3dx9: Return an error if no fallback format is found.
Module: wine Branch: master Commit: fcdcd5d3cbb58a40894f661fd8a9285b81a55789 URL: https://source.winehq.org/git/wine.git/?a=commit;h=fcdcd5d3cbb58a40894f661fd... Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Oct 30 10:24:39 2019 +0100 d3dx9: Return an error if no fallback format is found. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/texture.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c index 12cb2f3983..736d11dfad 100644 --- a/dlls/d3dx9_36/texture.c +++ b/dlls/d3dx9_36/texture.c @@ -323,6 +323,11 @@ HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UIN bestfmt = curfmt; } } + if (!bestfmt) + { + hr = D3DERR_NOTAVAILABLE; + goto cleanup; + } fmt = bestfmt; hr = D3D_OK; }
participants (1)
-
Alexandre Julliard