From 13e06719591bad61d23d496f87f4b82122bd6529 Mon Sep 17 00:00:00 2001 From: Zebediah Figura Date: Sat, 27 Jan 2018 15:30:32 -0600 Subject: [PATCH] hlink: Directly check for S_OK from IHlinkBrowseContext_GetObject(). Fixes a regression introduced by 00aca1476efd573cbf9d31a45c3d484f6fa6055b Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- dlls/hlink/link.c | 2 +- dlls/hlink/tests/hlink.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/hlink/link.c b/dlls/hlink/link.c index 983765cefea..25ee45d7c7e 100644 --- a/dlls/hlink/link.c +++ b/dlls/hlink/link.c @@ -493,7 +493,7 @@ static HRESULT WINAPI IHlink_fnNavigate(IHlink* iface, DWORD grfHLNF, LPBC pbc, if (phbc) { r = IHlinkBrowseContext_GetObject(phbc, mon, TRUE, &unk); - if (r == S_FALSE) + if (r != S_OK) { CreateBindCtx(0, &bcxt); RegisterBindStatusCallback(bcxt, pbsc, NULL, 0); diff --git a/dlls/hlink/tests/hlink.c b/dlls/hlink/tests/hlink.c index e40807cc8ae..3525c4478cf 100644 --- a/dlls/hlink/tests/hlink.c +++ b/dlls/hlink/tests/hlink.c @@ -891,7 +891,7 @@ static HRESULT WINAPI HlinkBrowseContext_GetObject(IHlinkBrowseContext *iface, ok(fBindIfRootRegistered == 1, "fBindIfRootRegistered = %x\n", fBindIfRootRegistered); *ppiunk = HBC_object; - return HBC_object ? S_OK : S_FALSE; + return HBC_object ? S_OK : 0xdeadbeef; } static HRESULT WINAPI HlinkBrowseContext_Revoke(IHlinkBrowseContext *iface, DWORD dwRegister)