Commit 2211b6e5 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

mshtml: Add some error handling to hlink_frame_navigate.

parent 846bc878
......@@ -744,6 +744,7 @@ void hlink_frame_navigate(HTMLDocument *doc, IHlinkFrame *hlink_frame,
IBindCtx *bindctx;
IMoniker *mon;
IHlink *hlink;
HRESULT hr;
callback = create_bscallback(NULL);
......@@ -754,24 +755,35 @@ void hlink_frame_navigate(HTMLDocument *doc, IHlinkFrame *hlink_frame,
debugstr_an(callback->post_data, callback->post_data_len));
}
CreateAsyncBindCtx(0, STATUSCLB(callback), NULL, &bindctx);
hr = CreateAsyncBindCtx(0, STATUSCLB(callback), NULL, &bindctx);
if (FAILED(hr)) {
IBindStatusCallback_Release(STATUSCLB(callback));
return;
}
hlink = Hlink_Create();
if (!hlink) {
IBindCtx_Release(bindctx);
IBindStatusCallback_Release(STATUSCLB(callback));
return;
}
CreateURLMoniker(NULL, uri, &mon);
IHlink_SetMonikerReference(hlink, 0, mon, NULL);
hr = CreateURLMoniker(NULL, uri, &mon);
if (SUCCEEDED(hr)) {
IHlink_SetMonikerReference(hlink, 0, mon, NULL);
if(hlnf & HLNF_OPENINNEWWINDOW) {
static const WCHAR wszBlank[] = {'_','b','l','a','n','k',0};
IHlink_SetTargetFrameName(hlink, wszBlank); /* FIXME */
}
if(hlnf & HLNF_OPENINNEWWINDOW) {
static const WCHAR wszBlank[] = {'_','b','l','a','n','k',0};
IHlink_SetTargetFrameName(hlink, wszBlank); /* FIXME */
}
IHlinkFrame_Navigate(hlink_frame, hlnf, bindctx, STATUSCLB(callback), hlink);
IHlinkFrame_Navigate(hlink_frame, hlnf, bindctx, STATUSCLB(callback), hlink);
IMoniker_Release(mon);
}
IBindCtx_Release(bindctx);
IBindStatusCallback_Release(STATUSCLB(callback));
IMoniker_Release(mon);
}
HRESULT start_binding(BSCallback *bscallback)
......
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