Commit 9f47704f authored by Gabriel Ivăncescu's avatar Gabriel Ivăncescu Committed by Alexandre Julliard

mshtml: Handle S_FALSE return values from IUri methods.

parent b75ed039
......@@ -215,7 +215,7 @@ compat_mode_t get_max_compat_mode(IUri *uri)
{
compat_config_t *iter;
size_t len, iter_len;
BSTR host;
BSTR host = NULL;
HRESULT hres;
static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
......@@ -224,8 +224,10 @@ compat_mode_t get_max_compat_mode(IUri *uri)
if(!uri)
return global_max_compat_mode;
hres = IUri_GetHost(uri, &host);
if(FAILED(hres))
if(hres != S_OK) {
SysFreeString(host);
return global_max_compat_mode;
}
len = SysStringLen(host);
LIST_FOR_EACH_ENTRY(iter, &compat_config, compat_config_t, entry) {
......
......@@ -1176,7 +1176,8 @@ static HRESULT WINAPI HlinkTarget_Navigate(IHlinkTarget *iface, DWORD grfHLNF, L
if (FAILED(hres))
return hres;
ShellExecuteW(NULL, L"open", uri, NULL, NULL, SW_SHOW);
if(hres == S_OK)
ShellExecuteW(NULL, L"open", uri, NULL, NULL, SW_SHOW);
SysFreeString(uri);
return S_OK;
}
......
......@@ -1123,7 +1123,7 @@ HRESULT load_script(HTMLScriptElement *script_elem, const WCHAR *src, BOOL async
hres = IUri_GetScheme(uri, &bsc->scheme);
IUri_Release(uri);
if(FAILED(hres))
if(hres != S_OK)
bsc->scheme = URL_SCHEME_UNKNOWN;
IHTMLScriptElement_AddRef(&script_elem->IHTMLScriptElement_iface);
......
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