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

d3d11: Return E_INVALIDARG from GetData() when "data" is NULL and "data_size" is non-zero.

parent c0fb3fb9
......@@ -298,6 +298,9 @@ static HRESULT STDMETHODCALLTYPE d3d10_query_GetData(ID3D10Query *iface, void *d
TRACE("iface %p, data %p, data_size %u, flags %#x.\n", iface, data, data_size, flags);
if (!data && data_size)
return E_INVALIDARG;
wined3d_flags = wined3d_getdata_flags_from_d3d11_async_getdata_flags(flags);
wined3d_mutex_lock();
......
......@@ -527,6 +527,9 @@ static HRESULT STDMETHODCALLTYPE d3d11_immediate_context_GetData(ID3D11DeviceCon
TRACE("iface %p, asynchronous %p, data %p, data_size %u, data_flags %#x.\n",
iface, asynchronous, data, data_size, data_flags);
if (!data && data_size)
return E_INVALIDARG;
wined3d_flags = wined3d_getdata_flags_from_d3d11_async_getdata_flags(data_flags);
wined3d_mutex_lock();
......
......@@ -4710,7 +4710,7 @@ static void test_occlusion_query(void)
hr = ID3D11DeviceContext_GetData(context, query, NULL, sizeof(DWORD), 0);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
hr = ID3D11DeviceContext_GetData(context, query, NULL, sizeof(data), 0);
todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
ID3D11DeviceContext_Begin(context, query);
ID3D11DeviceContext_End(context, query);
......
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