From 847d5680613cb578ba4a548960480363a3230174 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Tue, 23 Mar 2021 22:04:36 +0000 Subject: fix missing bitmap from preventing history and scroll updates --- desktop/browser_history.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/desktop/browser_history.c b/desktop/browser_history.c index 39072ffa2..2fbc80f89 100644 --- a/desktop/browser_history.c +++ b/desktop/browser_history.c @@ -435,9 +435,7 @@ nserror browser_window_history_update(struct browser_window *bw, history = bw->history; - if (!history || - !history->current || - !history->current->page.bitmap) { + if ((history == NULL) || (history->current == NULL)) { return NSERROR_INVALID; } @@ -456,7 +454,7 @@ nserror browser_window_history_update(struct browser_window *bw, guit->bitmap->render(history->current->page.bitmap, content); } - if (bw->window != NULL && + if ((bw->window != NULL) && guit->window->get_scroll(bw->window, &sx, &sy)) { int content_height = content_get_height(content); int content_width = content_get_width(content); @@ -490,9 +488,7 @@ browser_window_history_get_scroll(struct browser_window *bw, history = bw->history; - if (!history || - !history->current || - !history->current->page.bitmap) { + if ((history== NULL) || (history->current == NULL)) { return NSERROR_INVALID; } -- cgit v1.2.3