summaryrefslogtreecommitdiff
path: root/src/cairo-xcb-surface.c
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2012-04-02 20:43:00 +0200
committerUli Schlachter <psychon@znc.in>2012-04-02 21:02:24 +0200
commitc77112c5464d7ff21052527f82f4d729cc509291 (patch)
tree60836f0a51172aa6b7a7a2c1cf41dac0506ad592 /src/cairo-xcb-surface.c
parentd18542b735bb777b444152f0ef06de18993635bd (diff)
downloadcairo-c77112c5464d7ff21052527f82f4d729cc509291.tar.gz
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 <psychon@znc.in>
Diffstat (limited to 'src/cairo-xcb-surface.c')
-rw-r--r--src/cairo-xcb-surface.c2
1 files changed, 1 insertions, 1 deletions
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;
}