hlink/tests: Check return value (Coverity).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2017-12-23 10:49:48 +03:00 committed by Alexandre Julliard
parent c0d8de63a9
commit 2bde3e203b
1 changed files with 3 additions and 1 deletions

View File

@ -877,11 +877,13 @@ static HRESULT WINAPI HlinkBrowseContext_GetObject(IHlinkBrowseContext *iface,
{
IBindCtx *bctx;
WCHAR *name;
HRESULT hr;
CHECK_EXPECT(HBC_GetObject);
CreateBindCtx(0, &bctx);
IMoniker_GetDisplayName(pimk, bctx, NULL, &name);
hr = IMoniker_GetDisplayName(pimk, bctx, NULL, &name);
ok(hr == S_OK, "Failed to get display name, hr %#x.\n", hr);
ok(!lstrcmpW(winehq_urlW, name) || !lstrcmpW(winehq_404W, name), "got unexpected url\n");
CoTaskMemFree(name);
IBindCtx_Release(bctx);