diff --git a/src/d3d9/d3d9_adapter.cpp b/src/d3d9/d3d9_adapter.cpp index 5ae10210a..d166d7138 100644 --- a/src/d3d9/d3d9_adapter.cpp +++ b/src/d3d9/d3d9_adapter.cpp @@ -114,6 +114,9 @@ namespace dxvk { DWORD Usage, D3DRESOURCETYPE RType, D3D9Format CheckFormat) { + if(unlikely(AdapterFormat == D3D9Format::Unknown)) + return D3DERR_INVALIDCALL; + if (!IsSupportedAdapterFormat(AdapterFormat)) return D3DERR_NOTAVAILABLE;