From 04b9d5d9b1ab8544fc0918d8ced90dc70641e727 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 6 Apr 2013 09:07:24 +0100 Subject: xlib: Wrap errors generating sources in an error surface Once upon a time the wrapping was provided by the caller, but the current requirement is that the error is propagated back as an error surface. Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=63196 Signed-off-by: Chris Wilson --- src/cairo-xlib-source.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cairo-xlib-source.c b/src/cairo-xlib-source.c index 56dff657..5874f8d8 100644 --- a/src/cairo-xlib-source.c +++ b/src/cairo-xlib-source.c @@ -294,7 +294,7 @@ render_pattern (cairo_xlib_surface_t *dst, extents->height); if (src->base.type != CAIRO_SURFACE_TYPE_XLIB) { cairo_surface_destroy (&src->base); - return None; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } map_extents = *extents; @@ -1005,7 +1005,7 @@ surface_source (cairo_xlib_surface_t *dst, if (xsrc->base.type != CAIRO_SURFACE_TYPE_XLIB) { cairo_surface_destroy (src); cairo_surface_destroy (&xsrc->base); - return None; + return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); } if (_cairo_surface_is_image (src)) { -- cgit v1.2.3