Commit ba4ee497 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

dxgi: Check NULL output parameter in dxgi_adapter_EnumOutputs().

parent 23a8887d
......@@ -128,6 +128,9 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_EnumOutputs(IWineDXGIAdapter *ifac
TRACE("iface %p, output_idx %u, output %p.\n", iface, output_idx, output);
if (!output)
return E_INVALIDARG;
if (output_idx > 0)
{
*output = NULL;
......
......@@ -1175,6 +1175,9 @@ static void test_output(void)
hr = IDXGIDevice_GetAdapter(device, &adapter);
ok(SUCCEEDED(hr), "GetAdapter failed, hr %#x.\n", hr);
hr = IDXGIAdapter_EnumOutputs(adapter, 0, NULL);
ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr);
hr = IDXGIAdapter_EnumOutputs(adapter, 0, &output);
if (hr == DXGI_ERROR_NOT_FOUND)
{
......
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