evr/presenter: Check for null argument in GetVideoWindow().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
9b1bd73188
commit
c01a9bae61
|
@ -616,7 +616,12 @@ static HRESULT WINAPI video_presenter_control_GetVideoWindow(IMFVideoDisplayCont
|
|||
|
||||
TRACE("%p, %p.\n", iface, window);
|
||||
|
||||
if (!window)
|
||||
return E_POINTER;
|
||||
|
||||
EnterCriticalSection(&presenter->cs);
|
||||
*window = presenter->video_window;
|
||||
LeaveCriticalSection(&presenter->cs);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
|
|
@ -1065,6 +1065,9 @@ static void test_default_presenter(void)
|
|||
hwnd = create_window();
|
||||
ok(!!hwnd, "Failed to create a test window.\n");
|
||||
|
||||
hr = IMFVideoDisplayControl_GetVideoWindow(display_control, NULL);
|
||||
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
|
||||
|
||||
hwnd2 = hwnd;
|
||||
hr = IMFVideoDisplayControl_GetVideoWindow(display_control, &hwnd2);
|
||||
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||
|
|
Loading…
Reference in New Issue