diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2017-09-23 16:10:45 +0100 |
---|---|---|
committer | Michael Drake <michael.drake@codethink.co.uk> | 2017-09-23 16:10:45 +0100 |
commit | 9ca33854bf35b46a7796b334ace870029d3e36b9 (patch) | |
tree | a155f272c6acb2833eec06300f318678b291933e /desktop/browser_history.c | |
parent | fb4be0feb2afd8a3d321673c92a5612be570a70a (diff) | |
download | netsurf-9ca33854bf35b46a7796b334ace870029d3e36b9.tar.gz netsurf-9ca33854bf35b46a7796b334ace870029d3e36b9.tar.bz2 |
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.
Diffstat (limited to 'desktop/browser_history.c')
-rw-r--r-- | desktop/browser_history.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |