mshtml: Correctly handle S_OK with NULL URL return from TranslateUrl.
This commit is contained in:
parent
0200ee838d
commit
203c47e604
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue