diff --git a/src/sbbs3/js_file_area.c b/src/sbbs3/js_file_area.c index 7fd3a81c6c7ededc38c6ac4cb9714203a143c4ad..dc8e363b66da57251ea681143bb949c6718cc5b9 100644 --- a/src/sbbs3/js_file_area.c +++ b/src/sbbs3/js_file_area.c @@ -78,7 +78,7 @@ JSObject* DLLCALL js_CreateFileAreaObject(JSContext* cx, JSObject* parent, scfg_ JSBool found; /* Return existing object if it's already been created */ - if(JS_GetProperty(cx,parent,"file_area",&val)) + if(JS_GetProperty(cx,parent,"file_area",&val) && val!=JSVAL_VOID) return(JSVAL_TO_OBJECT(val)); areaobj = JS_DefineObject(cx, parent, "file_area", &js_file_area_class, NULL, 0); diff --git a/src/sbbs3/js_msg_area.c b/src/sbbs3/js_msg_area.c index 18ba32c2c0c568e60aea18f31cba60966801c66c..e70f55403c0267b85e06014debca233548c26654 100644 --- a/src/sbbs3/js_msg_area.c +++ b/src/sbbs3/js_msg_area.c @@ -130,7 +130,7 @@ JSObject* DLLCALL js_CreateMsgAreaObject(JSContext* cx, JSObject* parent, scfg_t JSBool found; /* Return existing object if it's already been created */ - if(JS_GetProperty(cx,parent,"msg_area",&val)) + if(JS_GetProperty(cx,parent,"msg_area",&val) && val!=JSVAL_VOID) return(JSVAL_TO_OBJECT(val)); areaobj = JS_DefineObject(cx, parent, "msg_area", &js_msg_area_class, NULL, 0); diff --git a/src/sbbs3/js_user.c b/src/sbbs3/js_user.c index 1da4e854a749f103aecb89f74d07eb104ab22565..5f81a7ee96e3d19c0378405a9e372cf5e4c0f79c 100644 --- a/src/sbbs3/js_user.c +++ b/src/sbbs3/js_user.c @@ -750,7 +750,7 @@ JSObject* DLLCALL js_CreateUserObject(JSContext* cx, JSObject* parent, scfg_t* c jsval val; /* Return existing user object if it's already been created */ - if(JS_GetProperty(cx,parent,name,&val)) + if(JS_GetProperty(cx,parent,name,&val) && val!=JSVAL_VOID) return(JSVAL_TO_OBJECT(val)); userobj = JS_DefineObject(cx, parent, name, &js_user_class, NULL, 0);