From 7b7ae17931c966c3e73bd8b515bb45511e9c7928 Mon Sep 17 00:00:00 2001 From: vidur Date: Wed, 1 Jul 1998 18:32:35 +0000 Subject: [PATCH] Deal with NULL object case before asking if its an object --- dom/tools/JSStubGen.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dom/tools/JSStubGen.cpp b/dom/tools/JSStubGen.cpp index f087068f36c..7672ee1777b 100644 --- a/dom/tools/JSStubGen.cpp +++ b/dom/tools/JSStubGen.cpp @@ -453,16 +453,16 @@ static const char *kSetCaseNonPrimaryStr = static const char *kObjectSetCaseStr = -" if (JSVAL_IS_OBJECT(*vp)) {\n" +" if (JSVAL_IS_NULL(*vp)) {\n" +" prop = nsnull;\n" +" }\n" +" else if (JSVAL_IS_OBJECT(*vp)) {\n" " JSObject *jsobj = JSVAL_TO_OBJECT(*vp); \n" " nsISupports *supports = (nsISupports *)JS_GetPrivate(cx, jsobj);\n" " if (NS_OK != supports->QueryInterface(kI%sIID, (void **)&prop)) {\n" " return JS_FALSE;\n" " }\n" " }\n" -" else if (JSVAL_IS_NULL(*vp)) {\n" -" prop = nsnull;\n" -" }\n" " else {\n" " return JS_FALSE;\n" " }\n";