[PATCH] fixed NULL ptr crash
Marcus Meissner
marcus at jet.franken.de
Wed Oct 25 15:19:51 CDT 2006
Hi,
If nsIWebBrowser_GetContentDOMWindow fails we must
not deallocate dom_window ... Only after the nsres
check.
Ciao, Marcus
---
dlls/mshtml/olecmd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
f44a99d8c152ad21911b2d3ac42f84211d9a734d
diff --git a/dlls/mshtml/olecmd.c b/dlls/mshtml/olecmd.c
index fa4afb4..0ab2ad6 100644
--- a/dlls/mshtml/olecmd.c
+++ b/dlls/mshtml/olecmd.c
@@ -422,12 +422,12 @@ static void setup_ns_editing(NSContainer
}
nsres = nsIWebBrowser_GetContentDOMWindow(This->webbrowser, &dom_window);
- nsIDOMWindow_Release(dom_window);
if(NS_FAILED(nsres)) {
ERR("Could not get content DOM window: %08x\n", nsres);
nsIEditingSession_Release(editing_session);
return;
}
+ nsIDOMWindow_Release(dom_window);
nsres = nsIEditingSession_MakeWindowEditable(editing_session, dom_window, NULL, FALSE);
nsIEditingSession_Release(editing_session);
--
1.2.4
More information about the wine-patches
mailing list