summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-08 09:56:46 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-08 18:24:48 +0100
commite48cbd3b47a6e4f7c1f66b3085df41546460e477 (patch)
tree266f141081b6a2c067ff087ca8e9d6f8a8ea1d6e
parent4e3c19833ef8631c1f1cd54870c0a86d88252886 (diff)
xcb: Reset picture after failed snapshot.
Clear the local picture variable if we cannot use the snapshot so that we are forced to create a new and valid picture.
-rw-r--r--src/cairo-xcb-surface-render.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index 5ea02e86..dba87501 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -1131,13 +1131,12 @@ _cairo_xcb_surface_picture (cairo_xcb_surface_t *target,
const cairo_surface_pattern_t *pattern,
const cairo_rectangle_int_t *extents)
{
- cairo_surface_t *source;
+ cairo_surface_t *const source = pattern->surface;
cairo_xcb_picture_t *picture;
cairo_filter_t filter;
cairo_extend_t extend;
cairo_status_t status;
- source = pattern->surface;
if (source->is_clear) {
if (source->content & CAIRO_CONTENT_ALPHA)
return _cairo_xcb_transparent_picture (target);
@@ -1152,6 +1151,7 @@ _cairo_xcb_surface_picture (cairo_xcb_surface_t *target,
picture = (cairo_xcb_picture_t *) cairo_surface_reference (&picture->base);
goto setup_picture;
}
+ picture = NULL;
}
if (source->type == CAIRO_SURFACE_TYPE_XCB)