Commit 5ba17254 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Access document object via browser object in handle_navigation_error and…

mshtml: Access document object via browser object in handle_navigation_error and handle_extern_mime_navigation. Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 225b2f67
......@@ -1394,13 +1394,13 @@ static void handle_navigation_error(nsChannelBSC *This, DWORD result)
BSTR unk;
HRESULT hres;
if(!This->is_doc_channel || !This->bsc.window)
if(!This->is_doc_channel || !This->bsc.window || !This->bsc.window->base.outer_window
|| !This->bsc.window->base.outer_window->browser)
return;
outer_window = This->bsc.window->base.outer_window;
doc = outer_window->doc_obj;
if(!doc || !doc->doc_object_service || !doc->client)
doc = outer_window->browser->doc;
if(!doc->doc_object_service || !doc->client)
return;
hres = IDocObjectService_IsErrorUrl(doc->doc_object_service,
......@@ -1590,10 +1590,10 @@ static void handle_extern_mime_navigation(nsChannelBSC *This)
VARIANT flags;
HRESULT hres;
if(!This->bsc.window || !This->bsc.window->base.outer_window || !This->bsc.window->base.outer_window->doc_obj)
if(!This->bsc.window || !This->bsc.window->base.outer_window || !This->bsc.window->base.outer_window->browser)
return;
doc_obj = This->bsc.window->base.outer_window->doc_obj;
doc_obj = This->bsc.window->base.outer_window->browser->doc;
hres = IOleClientSite_QueryInterface(doc_obj->client, &IID_IOleCommandTarget, (void**)&cmdtrg);
if(SUCCEEDED(hres)) {
......
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