From 4465ff779aae506194e8bf0a649947ee67bbc5fc Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Thu, 14 Oct 2010 18:12:39 +0200 Subject: [PATCH] XCB: Move the assert from 5a0f8f7320c916c Calling _cairo_xcb_surface_ensure_picture() on a XCB surface whose fallback member is non-null is always an error. It's possible that the surface first gets a picture assigned and later it's fallback member is set. In this situation, it's still wrong to use the surface's picture for any drawing- Signed-off-by: Uli Schlachter --- src/cairo-xcb-surface-render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c index 8a6aa2809..7258c59db 100644 --- a/src/cairo-xcb-surface-render.c +++ b/src/cairo-xcb-surface-render.c @@ -300,8 +300,8 @@ _cairo_xcb_surface_clear_clip_region (cairo_xcb_surface_t *surface) static void _cairo_xcb_surface_ensure_picture (cairo_xcb_surface_t *surface) { + assert (surface->fallback == NULL); if (surface->picture == XCB_NONE) { - assert (surface->fallback == NULL); surface->picture = _cairo_xcb_connection_get_xid (surface->connection); _cairo_xcb_connection_render_create_picture (surface->connection, surface->picture,