Commit df8ef3a5 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

d3d11: Always initialize out view pointer in CreateRenderTargetView().

parent 57e7ccaa
......@@ -2939,8 +2939,10 @@ static void test_create_rendertarget_view(void)
if (!enable_debug_layer)
{
rtview = (void *)0xdeadbeef;
hr = ID3D10Device_CreateRenderTargetView(device, NULL, &rtv_desc, &rtview);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
ok(!rtview, "Unexpected pointer %p.\n", rtview);
}
expected_refcount = get_refcount(device) + 1;
......@@ -3057,8 +3059,10 @@ static void test_create_rendertarget_view(void)
}
get_rtv_desc(&rtv_desc, &invalid_desc_tests[i].rtv_desc);
rtview = (void *)0xdeadbeef;
hr = ID3D10Device_CreateRenderTargetView(device, texture, &rtv_desc, &rtview);
ok(hr == E_INVALIDARG, "Test %u: Got unexpected hr %#x.\n", i, hr);
ok(!rtview, "Unexpected pointer %p.\n", rtview);
ID3D10Resource_Release(texture);
}
......
......@@ -3334,6 +3334,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateRenderTargetView(ID3D11Devic
TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
*view = NULL;
if (!resource)
return E_INVALIDARG;
......@@ -5957,6 +5959,8 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateRenderTargetView(ID3D10Devic
TRACE("iface %p, resource %p, desc %p, view %p.\n", iface, resource, desc, view);
*view = NULL;
if (!resource)
return E_INVALIDARG;
......
......@@ -4050,8 +4050,10 @@ static void test_create_rendertarget_view(void)
if (!enable_debug_layer)
{
rtview = (void *)0xdeadbeef;
hr = ID3D11Device_CreateRenderTargetView(device, NULL, &rtv_desc, &rtview);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
ok(!rtview, "Unexpected pointer %p.\n", rtview);
}
expected_refcount = get_refcount(device) + 1;
......@@ -4168,8 +4170,10 @@ static void test_create_rendertarget_view(void)
}
get_rtv_desc(&rtv_desc, &invalid_desc_tests[i].rtv_desc);
rtview = (void *)0xdeadbeef;
hr = ID3D11Device_CreateRenderTargetView(device, texture, &rtv_desc, &rtview);
ok(hr == E_INVALIDARG, "Test %u: Got unexpected hr %#x.\n", i, hr);
ok(!rtview, "Unexpected pointer %p.\n", rtview);
ID3D11Resource_Release(texture);
}
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