1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-29 03:17:53 -04:00

Return NULL when a script tries to get a bookmark that does not exist

in the given folder. (What was I thinking before?)
This commit is contained in:
Miciah Dashiel Butler Masters 2005-12-29 22:18:45 +00:00 committed by Miciah Dashiel Butler Masters
parent 684bac3b22
commit 9e06b709d4

View File

@ -173,8 +173,13 @@ bookmark_folder_get_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp)
}
bookmark = get_bookmark_by_name(folder, title);
if (bookmark) object_lock(bookmark);
if (!bookmark) {
*vp = JSVAL_NULL;
return JS_TRUE;
}
object_lock(bookmark);
*vp = OBJECT_TO_JSVAL(smjs_get_bookmark_object(bookmark));
return JS_TRUE;