Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/dxgi/adapter.c | 3 +++ dlls/dxgi/tests/dxgi.c | 3 +++ 2 files changed, 6 insertions(+)
diff --git a/dlls/dxgi/adapter.c b/dlls/dxgi/adapter.c index d2fc629c84..7cdf7bd0d6 100644 --- a/dlls/dxgi/adapter.c +++ b/dlls/dxgi/adapter.c @@ -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; diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index 3ff42c4bc6..e2b5df7b27 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -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) {
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=65536
Your paranoid android.
=== debian10 (32 bit Chinese:China report) ===
dxgi: dxgi: Timeout
Report validation errors: dxgi:dxgi has unaccounted for todo messages The report seems to have been truncated