Module: wine Branch: master Commit: fbc4d3f1602e6ae28ae92e497f2e01ccbb9cb224 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fbc4d3f1602e6ae28ae92e497f...
Author: Zhenbo Li litimetal@gmail.com Date: Mon Jul 21 22:20:39 2014 +0800
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 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);