diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-03 19:21:59 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-03 19:21:59 +0100 |
commit | af26560f258d93cc78782ddd0208128756874c11 (patch) | |
tree | 43c77d3b21b57cd7143a04ec73c30a8b60dc73df /test/xlib-surface-source.c | |
parent | c549203c8d69474be4362037f702e4fb59c9929e (diff) |
test: Improve memfault behaviour.
Various minor tweaks to convert asserts into error returns and to
improve error checking on intermediate surfaces.
Diffstat (limited to 'test/xlib-surface-source.c')
-rw-r--r-- | test/xlib-surface-source.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/xlib-surface-source.c b/test/xlib-surface-source.c index 65a9fdfe..7d2ed71c 100644 --- a/test/xlib-surface-source.c +++ b/test/xlib-surface-source.c @@ -79,7 +79,12 @@ create_source_surface (int size) xrender_format, size, size); data->device = cairo_device_reference (cairo_surface_get_device (surface)); - cairo_surface_set_user_data (surface, &closure_key, data, cleanup); + if (cairo_surface_set_user_data (surface, &closure_key, data, cleanup)) { + cairo_surface_finish (surface); + cairo_surface_destroy (surface); + cleanup (data); + return NULL; + } return surface; #else |