diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index a7495106fd2..18ced2d33de 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -321,6 +321,8 @@ js_Arguments(JSContext *cx, JSObject *parent, uint32 argc, JSObject *callee, double *argv, js_ArgsPrivateNative *apn) { JSObject *argsobj = NewArguments(cx, parent, argc, callee); + if (!argsobj) + return NULL; apn->argv = argv; SetArgsPrivateNative(argsobj, apn); return argsobj;