[PATCH] mshtml: Add check for doc_obj being NULL (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sat Jun 5 02:21:36 CDT 2010
Hi,
Coverity sees NULL check in condition above and thinks
we should have one here too.
(doc_obj is occasionaly NULL, but it seems only be
NULL when doc_node is also NULL).
Add a check anyway.
Ciao, Marcus
---
dlls/mshtml/htmlwindow.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c
index 1701b53..1ba1101 100644
--- a/dlls/mshtml/htmlwindow.c
+++ b/dlls/mshtml/htmlwindow.c
@@ -58,7 +58,7 @@ static void window_set_docnode(HTMLWindow *window, HTMLDocumentNode *doc_node)
htmldoc_addref(&doc_node->basedoc);
}
- if(doc_node && window->doc_obj->usermode == EDITMODE) {
+ if(doc_node && window->doc_obj && window->doc_obj->usermode == EDITMODE) {
nsIDOMNSHTMLDocument *nshtmldoc;
nsAString mode_str;
nsresult nsres;
--
1.5.6
More information about the wine-patches
mailing list