Marcus Meissner : mshtml: Add check for doc_obj being NULL (Coverity).

Alexandre Julliard julliard at winehq.org
Mon Jun 7 10:02:29 CDT 2010


Module: wine
Branch: master
Commit: 4169d4dfb89cf2c69fdd2050f43e2491f08be6b8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4169d4dfb89cf2c69fdd2050f43e2491f08be6b8

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Sat Jun  5 09:21:36 2010 +0200

mshtml: Add check for doc_obj being NULL (Coverity).

---

 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;




More information about the wine-cvs mailing list