Commit 203c47e6 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Correctly handle S_OK with NULL URL return from TranslateUrl.

parent 0200ee83
......@@ -2324,7 +2324,7 @@ static HRESULT translate_uri(HTMLOuterWindow *window, IUri *orig_uri, BSTR *ret_
hres = IDocHostUIHandler_TranslateUrl(window->doc_obj->hostui, 0, display_uri,
&translated_url);
if(hres == S_OK) {
if(hres == S_OK && translated_url) {
TRACE("%08x %s -> %s\n", hres, debugstr_w(display_uri), debugstr_w(translated_url));
SysFreeString(display_uri);
hres = create_uri(translated_url, 0, &uri);
......
......@@ -2614,6 +2614,12 @@ static HRESULT WINAPI DocHostUIHandler_TranslateUrl(IDocHostUIHandler2 *iface, D
ok(ppchURLOut != NULL, "ppchURLOut == NULL\n");
ok(!*ppchURLOut, "*ppchURLOut = %p\n", *ppchURLOut);
/* Not related to hash navigation, just return NULL and S_OK in some cases. */
if(loading_hash) {
*ppchURLOut = NULL;
return S_OK;
}
return S_FALSE;
}
......
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