mshtml: Fixed get_target_window when no parent frame is found.

This commit is contained in:
Zhenbo Li 2014-07-21 22:20:39 +08:00 committed by Alexandre Julliard
parent 1f6073c861
commit fbc4d3f160
1 changed files with 3 additions and 2 deletions

View File

@ -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);