summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-04-06 09:07:24 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-04-06 09:07:24 +0100
commit04b9d5d9b1ab8544fc0918d8ced90dc70641e727 (patch)
tree50deb170f838fe6f789c39c07a7fd6d0bf287f8d /src
parentf6efecdfefa161c68fc5bf193a6487fc1a5047d5 (diff)
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r--src/cairo-xlib-source.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-xlib-source.c b/src/cairo-xlib-source.c
index 56dff6570..5874f8d8d 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)) {