Skip to content
Snippets Groups Projects
Commit 1ad338a0 authored by rswindell's avatar rswindell
Browse files

Little more paranoia in js_load().

parent 9eedd4ff
No related branches found
No related tags found
No related merge requests found
......@@ -347,7 +347,7 @@ js_load(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
SAFECOPY(path,filename);
else {
path[0]=0;
if(JS_GetProperty(cx, obj, "js", &val)) {
if(JS_GetProperty(cx, obj, "js", &val) && JSVAL_IS_OBJECT(val)) {
JSObject* js = JSVAL_TO_OBJECT(val);
if(JS_GetProperty(cx, js, JAVASCRIPT_LOAD_PATH_LIST, &val) && JSVAL_IS_OBJECT(val)) {
JSObject* list = JSVAL_TO_OBJECT(val);
......@@ -3568,6 +3568,4 @@ JSObject* DLLCALL js_CreateCommonObjects(JSContext* js_cx
return(js_glob);
}
#endif /* JAVSCRIPT */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment