From 2d58372ec2946ae47e2370341e3b8607c069c528 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Fri, 2 Oct 2020 20:15:23 +0100 Subject: Console: Do not try and log through a closed down window Signed-off-by: Daniel Silverstone --- content/handlers/javascript/duktape/Console.bnd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content') diff --git a/content/handlers/javascript/duktape/Console.bnd b/content/handlers/javascript/duktape/Console.bnd index fcf6ee83d..74601d6d4 100644 --- a/content/handlers/javascript/duktape/Console.bnd +++ b/content/handlers/javascript/duktape/Console.bnd @@ -51,7 +51,7 @@ write_log_entry(duk_context *ctx, unsigned int group, browser_window_console_fla duk_size_t msglen; const char *msg = duk_safe_to_lstring(ctx, 0, &msglen); - if (priv_win == NULL || priv_win->win == NULL || + if (priv_win == NULL || priv_win->win == NULL || priv_win->closed_down == true || browser_window_console_log(priv_win->win, BW_CS_SCRIPT_CONSOLE, msg, msglen, flags) != NSERROR_OK) { -- cgit v1.2.3