[PATCH v6] quartz: Return E_POINTER from IVideoWindow::get_Visible() if "visible" is NULL.
From: Pengpeng Dong <dongpengpeng(a)uniontech.com> Signed-off-by: Pengpeng Dong <dongpengpeng(a)uniontech.com> Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> --- v6: Fix an accidental double space in the test message; make subject line clearer and more grammatical. dlls/quartz/tests/videorenderer.c | 3 +++ dlls/quartz/window.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index c2b6271021a..448efe501b6 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -2257,6 +2257,9 @@ static void test_video_window(void) hr = IBaseFilter_QueryInterface(filter, &IID_IVideoWindow, (void **)&window); ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IVideoWindow_get_Visible(window, NULL); + ok(hr == E_POINTER, "Got hr %#x.\n", hr); + hr = IVideoWindow_get_Caption(window, &caption); todo_wine ok(hr == VFW_E_NOT_CONNECTED, "Got hr %#x.\n", hr); diff --git a/dlls/quartz/window.c b/dlls/quartz/window.c index 07e042eccdb..3983d43b08f 100644 --- a/dlls/quartz/window.c +++ b/dlls/quartz/window.c @@ -334,6 +334,9 @@ HRESULT WINAPI BaseControlWindowImpl_get_Visible(IVideoWindow *iface, LONG *visi TRACE("window %p, visible %p.\n", window, visible); + if (!visible) + return E_POINTER; + *visible = IsWindowVisible(window->hwnd) ? OATRUE : OAFALSE; return S_OK; } -- 2.28.0
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=78414 Your paranoid android. === w10pro64_he (32 bit report) === quartz: videorenderer.c:1088: Test failed: Thread should block in Receive(). === w10pro64_2scr (64 bit report) === quartz: videorenderer.c:1098: Test failed: Got hr 0x80004005. === w10pro64_ar (64 bit report) === quartz: videorenderer.c:1088: Test failed: Thread should block in Receive(). === w10pro64_he (64 bit report) === quartz: videorenderer.c:1088: Test failed: Thread should block in Receive(). === w10pro64_zh_CN (64 bit report) === quartz: videorenderer.c:1098: Test failed: Got hr 0x80004005.
participants (2)
-
Marvin -
Zebediah Figura