d3d9: Validate D3DQUERYTYPE.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
57d813c6e4
commit
c4e4357eb5
|
@ -185,6 +185,12 @@ HRESULT query_init(struct d3d9_query *query, struct d3d9_device *device, D3DQUER
|
|||
{
|
||||
HRESULT hr;
|
||||
|
||||
if (type > D3DQUERYTYPE_MEMORYPRESSURE)
|
||||
{
|
||||
WARN("Invalid query type %#x.\n", type);
|
||||
return D3DERR_NOTAVAILABLE;
|
||||
}
|
||||
|
||||
query->IDirect3DQuery9_iface.lpVtbl = &d3d9_query_vtbl;
|
||||
query->refcount = 1;
|
||||
|
||||
|
|
Loading…
Reference in New Issue