From fbc4d3f1602e6ae28ae92e497f2e01ccbb9cb224 Mon Sep 17 00:00:00 2001 From: Zhenbo Li Date: Mon, 21 Jul 2014 22:20:39 +0800 Subject: [PATCH] mshtml: Fixed get_target_window when no parent frame is found. --- 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 a9187a47f01..0de0585de56 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); -- 2.11.4.GIT