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>
This commit is contained in:
Uli Schlachter 2012-04-02 20:43:00 +02:00
parent d18542b735
commit c77112c546

View file

@ -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;
}