diff options
author | Brian Ewins <Brian.Ewins@gmail.com> | 2007-06-23 12:34:24 +0100 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2007-11-26 21:24:51 -0800 |
commit | 4fdc3a69fdb17acf6a394d12351b19cd61e17516 (patch) | |
tree | 296ea055e62a1d8eeb069ea4734be124fb1c8a00 | |
parent | 6e4ff01d0ba40576943c76da638fe0026baab62b (diff) | |
download | cairo-4fdc3a69fdb17acf6a394d12351b19cd61e17516.tar.gz |
do not return a cairo_status_t of UNSUPPORTED
We had a bug which converted cairo_int_status_t to cairo_status_t,
causing an assertion; reported at http://developer.imendio.com/node/128.
Return the generic out of memory error instead.
(cherry picked from commit 8c8ec63903f8ad67a88394eff1359607bb93cf88)
-rw-r--r-- | src/cairo-quartz-surface.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c index 5b57d2810..d151e00ff 100644 --- a/src/cairo-quartz-surface.c +++ b/src/cairo-quartz-surface.c @@ -899,13 +899,20 @@ _cairo_quartz_surface_acquire_source_image (void *abstract_surface, cairo_image_surface_t **image_out, void **image_extra) { + cairo_int_status_t status; cairo_quartz_surface_t *surface = (cairo_quartz_surface_t *) abstract_surface; //ND((stderr, "%p _cairo_quartz_surface_acquire_source_image\n", surface)); *image_extra = NULL; - return _cairo_quartz_get_image (surface, image_out, NULL); + status = _cairo_quartz_get_image (surface, image_out, NULL); + if (status) { + _cairo_error (CAIRO_STATUS_NO_MEMORY); + return CAIRO_STATUS_NO_MEMORY; + } + + return CAIRO_STATUS_SUCCESS; } static void @@ -933,8 +940,10 @@ _cairo_quartz_surface_acquire_dest_image (void *abstract_surface, *image_rect = surface->extents; status = _cairo_quartz_get_image (surface, image_out, &data); - if (status) - return status; + if (status) { + _cairo_error (CAIRO_STATUS_NO_MEMORY); + return CAIRO_STATUS_NO_MEMORY; + } *image_extra = data; |