From 669448d7b6ae420dfce6e8b25eda143ca2b31109 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 21 Jan 2016 14:49:57 +0000 Subject: Fix place where we're calling a js_* fn without checking for context. --- render/html.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'render') diff --git a/render/html.c b/render/html.c index 06e2e0673..6d2421f6e 100644 --- a/render/html.c +++ b/render/html.c @@ -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); -- cgit v1.2.3