mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-19 10:42:36 +03:00
Protect against attribute not being present
This commit is contained in:
parent
125f131714
commit
727bbbd216
@ -465,7 +465,7 @@ static void dukky_push_handler_code_(duk_context *ctx, dom_string *name,
|
||||
}
|
||||
|
||||
exc = dom_element_get_attribute(ele, onname, &val);
|
||||
if (exc != DOM_NO_ERR) {
|
||||
if ((exc != DOM_NO_ERR) || (val == NULL)) {
|
||||
dom_string_unref(onname);
|
||||
duk_push_lstring(ctx, "", 0);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user