Commit c4e4357e authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

d3d9: Validate D3DQUERYTYPE.

parent 57d813c6
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment