d3dx9: Return an error if no fallback format is found.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2019-10-30 10:24:39 +01:00 committed by Alexandre Julliard
parent a0840773f7
commit fcdcd5d3cb
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}