summaryrefslogtreecommitdiff
path: root/riscos/plotters.c
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2008-06-01 00:15:53 +0000
committerJames Bursa <james@netsurf-browser.org>2008-06-01 00:15:53 +0000
commit70c7b81c2fd459c87697216b69c2bd17e5d3086c (patch)
treec01c67c82c9a80e9f0ac2cf3697ea25257da98cf /riscos/plotters.c
parent21a3c99d3dcf20e13cdcf16fda6f01f6e6a3a1b3 (diff)
downloadnetsurf-70c7b81c2fd459c87697216b69c2bd17e5d3086c.tar.gz
netsurf-70c7b81c2fd459c87697216b69c2bd17e5d3086c.tar.bz2
Improve MNG error handling to show error code. Fix code not expecting bitmap_get_buffer() to return 0.
svn path=/trunk/netsurf/; revision=4237
Diffstat (limited to 'riscos/plotters.c')
-rw-r--r--riscos/plotters.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/riscos/plotters.c b/riscos/plotters.c
index da890abad..3650e2246 100644
--- a/riscos/plotters.c
+++ b/riscos/plotters.c
@@ -498,7 +498,14 @@ bool ro_plot_arc(int x, int y, int radius, int angle1, int angle2, colour c)
bool ro_plot_bitmap(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg)
{
- bitmap_get_buffer(bitmap);
+ char *buffer;
+
+ buffer = bitmap_get_buffer(bitmap);
+ if (!buffer) {
+ LOG(("bitmap_get_buffer failed"));
+ return false;
+ }
+
return image_redraw(bitmap->sprite_area,
ro_plot_origin_x + x * 2,
ro_plot_origin_y - y * 2,
@@ -516,7 +523,14 @@ bool ro_plot_bitmap_tile(int x, int y, int width, int height,
struct bitmap *bitmap, colour bg,
bool repeat_x, bool repeat_y)
{
- bitmap_get_buffer(bitmap);
+ char *buffer;
+
+ buffer = bitmap_get_buffer(bitmap);
+ if (!buffer) {
+ LOG(("bitmap_get_buffer failed"));
+ return false;
+ }
+
return image_redraw(bitmap->sprite_area,
ro_plot_origin_x + x * 2,
ro_plot_origin_y - y * 2,