summaryrefslogtreecommitdiff
path: root/render/box.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2016-04-26 12:14:56 +0100
committerVincent Sanders <vince@kyllikki.org>2016-04-26 12:14:56 +0100
commit69cea38f41b411ca9e55db365cf94339f4be891c (patch)
tree030fc58fa0cad7a75e02e1ea96562d9653a6c7a7 /render/box.c
parentdd14807c8cdff2f486f5da832490ff958c87ba62 (diff)
downloadnetsurf-69cea38f41b411ca9e55db365cf94339f4be891c.tar.gz
netsurf-69cea38f41b411ca9e55db365cf94339f4be891c.tar.bz2
update scrollbar_create error handling to return nserror
Diffstat (limited to 'render/box.c')
-rw-r--r--render/box.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/render/box.c b/render/box.c
index 7111f1a6e..5a0735e24 100644
--- a/render/box.c
+++ b/render/box.c
@@ -1151,11 +1151,12 @@ bool box_handle_scrollbars(struct content *c, struct box *box,
}
data->c = c;
data->box = box;
- if (!scrollbar_create(false, visible_height,
+ if (scrollbar_create(false, visible_height,
full_height, visible_height,
data, html_overflow_scroll_callback,
- &(box->scroll_y)))
+ &(box->scroll_y)) != NSERROR_OK) {
return false;
+ }
} else {
scrollbar_set_extents(box->scroll_y, visible_height,
visible_height, full_height);
@@ -1171,13 +1172,14 @@ bool box_handle_scrollbars(struct content *c, struct box *box,
}
data->c = c;
data->box = box;
- if (!scrollbar_create(true,
+ if (scrollbar_create(true,
visible_width -
(right ? SCROLLBAR_WIDTH : 0),
full_width, visible_width,
data, html_overflow_scroll_callback,
- &box->scroll_x))
+ &box->scroll_x) != NSERROR_OK) {
return false;
+ }
} else {
scrollbar_set_extents(box->scroll_x,
visible_width -