From 6848cc890a5eab8ea166b737d7f35a5b8ed94950 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Sat, 3 Oct 2020 14:23:43 +0100 Subject: browser_window: Check for bw==NULL before dereferencing it Signed-off-by: Daniel Silverstone --- desktop/browser_window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/browser_window.c b/desktop/browser_window.c index 32247062e..7b553f4e0 100644 --- a/desktop/browser_window.c +++ b/desktop/browser_window.c @@ -2599,14 +2599,14 @@ browser_window_redraw(struct browser_window *bw, struct rect content_clip; nserror res; - x /= bw->scale; - y /= bw->scale; - if (bw == NULL) { NSLOG(netsurf, INFO, "NULL browser window"); return false; } + x /= bw->scale; + y /= bw->scale; + if ((bw->current_content == NULL) && (bw->children == NULL)) { /* Browser window has no content, render blank fill */ -- cgit v1.2.3