mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05: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:
parent
684bac3b22
commit
9e06b709d4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user