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.
This commit is contained in:
Michael Drake 2015-09-26 12:53:43 +01:00
parent 46945f6362
commit 51c2dd70e2

View File

@ -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);
}