Commit a8e39c66 authored by Andrew Eikum's avatar Andrew Eikum Committed by Alexandre Julliard

hlink: Site data should only be set if the hlink has an HlinkSite.

parent 5c5e53ae
......@@ -211,10 +211,11 @@ static HRESULT WINAPI IHlink_fnGetHlinkSite( IHlink* iface,
TRACE("(%p)->(%p %p)\n", This, ppihlSite, pdwSiteData);
*ppihlSite = This->Site;
*pdwSiteData = This->SiteData;
if (This->Site)
if (This->Site) {
IHlinkSite_AddRef(This->Site);
*pdwSiteData = This->SiteData;
}
return S_OK;
}
......
......@@ -1788,7 +1788,7 @@ static void test_HlinkClone(void)
hres = IHlink_GetHlinkSite(cloned, &fnd_site, &fnd_data);
ok(hres == S_OK, "GetHlinkSite failed: %08x\n", hres);
ok(fnd_site == NULL, "Expected NULL site\n");
todo_wine ok(fnd_data == 4, "Expected site data to be 4, was: %d\n", fnd_data);
ok(fnd_data == 4, "Expected site data to be 4, was: %d\n", fnd_data);
IHlink_Release(cloned);
IHlink_Release(hl);
......
......@@ -708,7 +708,6 @@ static HRESULT WINAPI HlinkFrame_Navigate(IHlinkFrame *iface, DWORD grfHLNF, LPB
hres = IHlink_GetHlinkSite(pihlNavigate, &site, &site_data);
ok(hres == S_OK, "GetHlinkSite failed: %08x\n", hres);
ok(site == NULL, "site = %p\n, expected NULL\n", site);
todo_wine
ok(site_data == 0xdeadbeef, "site_data = %x\n", site_data);
}
......
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