From 34db2d392692d51bbc88d6a56aa4157ce1f4a35a Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Fri, 21 Oct 2011 15:16:08 +0200 Subject: [PATCH] hlink: Return S_FALSE in GetTargetFrameName when returning NULL. --- dlls/hlink/link.c | 8 ++++++++ dlls/mshtml/tests/htmldoc.c | 1 - 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/hlink/link.c b/dlls/hlink/link.c index 86b6ad6e9f1..a9297823ebf 100644 --- a/dlls/hlink/link.c +++ b/dlls/hlink/link.c @@ -437,7 +437,15 @@ static HRESULT WINAPI IHlink_fnGetTargetFrameName(IHlink* iface, HlinkImpl *This = impl_from_IHlink(iface); TRACE("(%p)->(%p)\n", This, ppwzTargetFrameName); + + if(!This->TargetFrameName) { + *ppwzTargetFrameName = NULL; + return S_FALSE; + } + *ppwzTargetFrameName = hlink_co_strdupW( This->TargetFrameName ); + if(!*ppwzTargetFrameName) + return E_OUTOFMEMORY; return S_OK; } diff --git a/dlls/mshtml/tests/htmldoc.c b/dlls/mshtml/tests/htmldoc.c index 02c9eab7498..fb07417700a 100644 --- a/dlls/mshtml/tests/htmldoc.c +++ b/dlls/mshtml/tests/htmldoc.c @@ -745,7 +745,6 @@ static HRESULT WINAPI HlinkFrame_Navigate(IHlinkFrame *iface, DWORD grfHLNF, LPB DWORD site_data = 0xdeadbeef; hres = IHlink_GetTargetFrameName(pihlNavigate, &frame_name); - todo_wine ok(hres == S_FALSE, "GetTargetFrameName failed: %08x\n", hres); ok(frame_name == NULL, "frame_name = %p\n", frame_name);