[PATCH] mshtml: add NULL check to get_frame_by_name

Indrek Altpere efbiaiinzinz at hotmail.com
Fri May 29 08:51:50 CDT 2015


Fixes https://bugs.winehq.org/show_bug.cgi?id=34982
---
 dlls/mshtml/htmlwindow.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c
index 618648e..c53ea16 100644
--- a/dlls/mshtml/htmlwindow.c
+++ b/dlls/mshtml/htmlwindow.c
@@ -406,6 +406,11 @@ HRESULT get_frame_by_name(HTMLOuterWindow *This, const WCHAR *name, BOOL deep, H
 
         nsIDOMWindow_Release(nswindow);
 
+        if(!window_iter) {
+            WARN("nsIDOMWindow without HTMLOuterWindow: %p\n", nswindow);
+            continue;
+        }
+
         hres = IHTMLElement_get_id(&window_iter->frame_element->element.IHTMLElement_iface, &id);
         if(FAILED(hres)) {
             FIXME("IHTMLElement_get_id failed: 0x%08x\n", hres);
-- 
1.9.1




More information about the wine-patches mailing list