browser_window: Check for bw==NULL before dereferencing it

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2020-10-03 14:23:43 +01:00
parent ba4c20a0c7
commit 6848cc890a
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74
1 changed files with 3 additions and 3 deletions

View File

@ -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 */