From c77112c5464d7ff21052527f82f4d729cc509291 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Mon, 2 Apr 2012 20:43:00 +0200 Subject: [PATCH] xcb: Fix SHM in _get_image() Commit 2283ab9 introduced a logic error. Instead of falling back to the non-SHM path when getting the image via SHM failed, we now did the fallback when getting the image via SHM worked (which means that the SHM operation was a waste of time). Signed-off-by: Uli Schlachter --- src/cairo-xcb-surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cairo-xcb-surface.c b/src/cairo-xcb-surface.c index fff4f52d1..6bedbda00 100644 --- a/src/cairo-xcb-surface.c +++ b/src/cairo-xcb-surface.c @@ -367,7 +367,7 @@ _get_image (cairo_xcb_surface_t *surface, if (use_shm) { image = _get_shm_image (surface, x, y, width, height); if (image) { - if (image->status) { + if (image->status == CAIRO_STATUS_SUCCESS) { _cairo_xcb_connection_release (connection); return image; }