From 3218d3f4c01161db2d6cb5182bb11bb143302029 Mon Sep 17 00:00:00 2001 From: "brendan%mozilla.org" Date: Tue, 9 Jul 2002 02:24:51 +0000 Subject: [PATCH] Null-check prop before dropping it (156354, r=khanson, sr=shaver). --- js/src/jsobj.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/src/jsobj.c b/js/src/jsobj.c index adb7f333a5e..4dc3efa888b 100644 --- a/js/src/jsobj.c +++ b/js/src/jsobj.c @@ -1184,7 +1184,8 @@ obj_propertyIsEnumerable(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, } ok = OBJ_GET_ATTRIBUTES(cx, obj, id, prop, &attrs); - OBJ_DROP_PROPERTY(cx, obj2, prop); + if (prop) + OBJ_DROP_PROPERTY(cx, obj2, prop); if (ok) *rval = BOOLEAN_TO_JSVAL((attrs & JSPROP_ENUMERATE) != 0); return ok;