Fix place where we're calling a js_* fn without checking for context.

This commit is contained in:
Michael Drake 2016-01-21 14:49:57 +00:00
parent 594012ef52
commit 669448d7b6

View File

@ -592,7 +592,9 @@ void html_finish_conversion(html_content *htmlc)
* object, but with its target set to the Document object (and
* the currentTarget set to the Window object)
*/
js_fire_event(htmlc->jscontext, "load", htmlc->document, NULL);
if (htmlc->jscontext != NULL) {
js_fire_event(htmlc->jscontext, "load", htmlc->document, NULL);
}
/* convert dom tree to box tree */
LOG("DOM to box (%p)", htmlc);