xcb: Fix xcb-huge-image-shm

The test failed with the following message:

cairo-surface.c:2265: _cairo_surface_create_in_error: Assertion `status <
CAIRO_STATUS_LAST_STATUS' failed.

_cairo_xcb_surface_create_shm_image() passed the error from
_cairo_xcb_connection_allocate_shm_info() to _create_in_error().

Fix this by never returning CAIRO_INT_STATUS_UNSUPPORTED from
_allocate_shm_info(). All other error cases in that function return
CAIRO_STATUS_NO_MEMORY, too.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2011-11-15 19:46:46 +01:00
parent edc238b40f
commit 3a94f4c709

View file

@ -577,7 +577,7 @@ _cairo_xcb_connection_allocate_shm_info (cairo_xcb_connection_t *connection,
connection->flags &= ~CAIRO_XCB_HAS_SHM;
free (pool);
CAIRO_MUTEX_UNLOCK (connection->shm_mutex);
return CAIRO_INT_STATUS_UNSUPPORTED;
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
}
pool->base = shmat (pool->shmid, NULL, 0);