Commit bf83d755 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

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

parent 58f46803
......@@ -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);
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment