mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[spidermonkey] Check for NULL
This commit is contained in:
parent
267e25e908
commit
fe90abbaec
@ -156,6 +156,10 @@ forms_set_items(JSContext *ctx, JS::HandleObject hobj, void *node)
|
|||||||
|
|
||||||
foreach (fv, vs->forms) {
|
foreach (fv, vs->forms) {
|
||||||
struct form *form = find_form_by_form_view(document, fv);
|
struct form *form = find_form_by_form_view(document, fv);
|
||||||
|
|
||||||
|
if (!form) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
JS::RootedObject v(ctx, get_form_object(ctx, form));
|
JS::RootedObject v(ctx, get_form_object(ctx, form));
|
||||||
JS::RootedValue ro(ctx, JS::ObjectOrNullValue(v));
|
JS::RootedValue ro(ctx, JS::ObjectOrNullValue(v));
|
||||||
JS_SetElement(ctx, hobj, counter, ro);
|
JS_SetElement(ctx, hobj, counter, ro);
|
||||||
|
Loading…
Reference in New Issue
Block a user