From 9ca33854bf35b46a7796b334ace870029d3e36b9 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 23 Sep 2017 16:10:45 +0100 Subject: [PATCH] Browser history: Don't segfault when visiting pages with frames. Core can't make queries of front end about browser windows with no gui window. --- desktop/browser_history.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/browser_history.c b/desktop/browser_history.c index dac9c7671..640302773 100644 --- a/desktop/browser_history.c +++ b/desktop/browser_history.c @@ -454,7 +454,8 @@ nserror browser_window_history_update(struct browser_window *bw, guit->bitmap->render(history->current->page.bitmap, content); } - if (guit->window->get_scroll(bw->window, &sx, &sy)) { + if (bw->window != NULL && + guit->window->get_scroll(bw->window, &sx, &sy)) { /* Successfully got scroll offsets, update the entry */ history->current->page.scroll_x = \ (float)sx / (float)content_get_width(content);