mshtml: Access document object via browser object in handle_navigation_error and handle_extern_mime_navigation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
225b2f67b1
commit
5ba1725491
|
@ -1394,13 +1394,13 @@ static void handle_navigation_error(nsChannelBSC *This, DWORD result)
|
||||||
BSTR unk;
|
BSTR unk;
|
||||||
HRESULT hres;
|
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;
|
return;
|
||||||
|
|
||||||
outer_window = This->bsc.window->base.outer_window;
|
outer_window = This->bsc.window->base.outer_window;
|
||||||
|
doc = outer_window->browser->doc;
|
||||||
doc = outer_window->doc_obj;
|
if(!doc->doc_object_service || !doc->client)
|
||||||
if(!doc || !doc->doc_object_service || !doc->client)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
hres = IDocObjectService_IsErrorUrl(doc->doc_object_service,
|
hres = IDocObjectService_IsErrorUrl(doc->doc_object_service,
|
||||||
|
@ -1590,10 +1590,10 @@ static void handle_extern_mime_navigation(nsChannelBSC *This)
|
||||||
VARIANT flags;
|
VARIANT flags;
|
||||||
HRESULT hres;
|
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;
|
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);
|
hres = IOleClientSite_QueryInterface(doc_obj->client, &IID_IOleCommandTarget, (void**)&cmdtrg);
|
||||||
if(SUCCEEDED(hres)) {
|
if(SUCCEEDED(hres)) {
|
||||||
|
|
Loading…
Reference in New Issue