dxgi: Check NULL output parameter in dxgi_adapter_EnumOutputs().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
23a8887ded
commit
ba4ee49705
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue