diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2015-09-26 12:53:43 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2015-09-26 12:53:43 +0100 |
commit | 51c2dd70e2bb8da61f683916111f083ec0263953 (patch) | |
tree | e8afb28695ab32aad192674acbd05beb85125c23 /javascript/duktape/Document.bnd | |
parent | 46945f636221ccf0751f3f0e2e78c6e6d33cab7f (diff) | |
download | netsurf-51c2dd70e2bb8da61f683916111f083ec0263953.tar.gz netsurf-51c2dd70e2bb8da61f683916111f083ec0263953.tar.bz2 |
Add assert before we wander off into the weeds.
Visiting slashdot we get a document write with a node that has no
html content user data.
Diffstat (limited to 'javascript/duktape/Document.bnd')
-rw-r--r-- | javascript/duktape/Document.bnd | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/javascript/duktape/Document.bnd b/javascript/duktape/Document.bnd index 0b478d5f5..dce110c0d 100644 --- a/javascript/duktape/Document.bnd +++ b/javascript/duktape/Document.bnd @@ -31,6 +31,7 @@ method Document::write() err = dom_node_get_user_data(priv->parent.node, corestring_dom___ns_key_html_content_data, &htmlc); + assert(htmlc != NULL); if (err == DOM_NO_ERR && htmlc->parser != NULL) { dom_hubbub_parser_insert_chunk(htmlc->parser, (uint8_t *)text, text_len); } |