summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2021-03-23 22:04:36 +0000
committerVincent Sanders <vince@kyllikki.org>2021-03-23 22:09:56 +0000
commit847d5680613cb578ba4a548960480363a3230174 (patch)
tree805e967063b457c265d08e9e6dd1c4810e38f76b
parent5749ace60f9359b6bc31d7f8c071d87d270733da (diff)
downloadnetsurf-847d5680613cb578ba4a548960480363a3230174.tar.gz
netsurf-847d5680613cb578ba4a548960480363a3230174.tar.bz2
fix missing bitmap from preventing history and scroll updates
-rw-r--r--desktop/browser_history.c10
1 files 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;
}