From: Zhenbo Li Subject: mshtml: Fixed get_target_window when no parent frame is found. Message-Id: <53CD21B7.70400@gmail.com> Date: Mon, 21 Jul 2014 22:20:39 +0800 --- dlls/mshtml/htmlanchor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/mshtml/htmlanchor.c b/dlls/mshtml/htmlanchor.c index a9187a4..0de0585 100644 --- a/dlls/mshtml/htmlanchor.c +++ b/dlls/mshtml/htmlanchor.c @@ -98,8 +98,9 @@ HTMLOuterWindow *get_target_window(HTMLOuterWindow *window, nsAString *target_st if(!strcmpiW(target, _parentW)) { if(!window->parent) { - WARN("Window has no parent\n"); - return NULL; + WARN("Window has no parent, treat as self\n"); + IHTMLWindow2_AddRef(&window->base.IHTMLWindow2_iface); + return window; } IHTMLWindow2_AddRef(&window->parent->base.IHTMLWindow2_iface);