mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-22 06:21:45 +03:00
dukky: Various checks for win being NULL
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
b577de7c5b
commit
2cb33b0c33
@ -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 ||
|
||||
if (priv_win == NULL || priv_win->win == NULL ||
|
||||
browser_window_console_log(priv_win->win, BW_CS_SCRIPT_CONSOLE,
|
||||
msg, msglen,
|
||||
flags) != NSERROR_OK) {
|
||||
|
@ -277,6 +277,9 @@ static duk_ret_t dukky_window_closedown_thread(duk_context *ctx)
|
||||
|
||||
init Window(struct browser_window *win, struct html_content *htmlc)
|
||||
%{
|
||||
/* It makes no sense if win or htmlc are NULL */
|
||||
assert(win != NULL);
|
||||
assert(htmlc != NULL);
|
||||
/* element window */
|
||||
priv->win = win;
|
||||
priv->htmlc = htmlc;
|
||||
|
Loading…
Reference in New Issue
Block a user