ieframe: Return S_FALSE in IWebBrowser2::get_Document when returning NULL.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2020-05-29 20:37:03 +02:00 committed by Alexandre Julliard
parent 58f4680380
commit bf83d755d9
2 changed files with 7 additions and 1 deletions

View File

@ -4056,6 +4056,7 @@ static void test_SetAdvise(void)
IViewObject2 *view;
IAdviseSink *sink;
IOleObject *oleobj;
IDispatch *doc;
DWORD aspects, flags;
if (!(browser = create_webbrowser())) return;
@ -4115,6 +4116,11 @@ static void test_SetAdvise(void)
hr = IViewObject2_SetAdvise(view, 0, 0, NULL);
ok(hr == S_OK, "got %08x\n", hr);
doc = (void*)0xdeadbeef;
hr = IWebBrowser2_get_Document(browser, &doc);
ok(hr == S_FALSE, "get_Document failed: %08x\n", hr);
ok(!doc, "doc = %p\n", doc);
IOleObject_Release(oleobj);
IViewObject2_Release(view);
IWebBrowser2_Release(browser);

View File

@ -404,7 +404,7 @@ static HRESULT WINAPI WebBrowser_get_Document(IWebBrowser2 *iface, IDispatch **p
}
*ppDisp = disp;
return S_OK;
return disp ? S_OK : S_FALSE;
}
static HRESULT WINAPI WebBrowser_get_TopLevelContainer(IWebBrowser2 *iface, VARIANT_BOOL *pBool)