From: Paulius Dilkas Subject: [2/2] mshtml: prevents a possible crash Message-Id: Date: Thu, 2 Apr 2015 16:54:26 +0300 Fixes one of the crashes caused by https://bugs.winehq.org/show_bug.cgi?id=34808 --- dlls/mshtml/htmlwindow.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index 3a31301..02e9570 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -407,10 +407,12 @@ HRESULT get_frame_by_name(HTMLOuterWindow *This, const WCHAR *name, BOOL deep, H nsIDOMWindow_Release(nswindow); - hres = IHTMLElement_get_id(&window_iter->frame_element->element.IHTMLElement_iface, &id); - if(FAILED(hres)) { - FIXME("IHTMLElement_get_id failed: 0x%08x\n", hres); - break; + if(window_iter) { + hres = IHTMLElement_get_id(&window_iter->frame_element->element.IHTMLElement_iface, &id); + if(FAILED(hres)) { + FIXME("IHTMLElement_get_id failed: 0x%08x\n", hres); + break; + } } if(id && !strcmpiW(id, name))