xcb: Fix premature pixmap free in boilerplate cleanup

A xcb surface has to be finished before the associated drawable can be freed or
there will be X11 errors when the surface is later finished or used again.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2011-01-04 12:39:12 +01:00
parent 673c44d3e8
commit a87001c063

View file

@ -91,6 +91,7 @@ _cairo_boilerplate_xcb_cleanup (void *closure)
xcb_target_closure_t *xtc = closure;
cairo_status_t status;
cairo_surface_finish (xtc->surface);
if (xtc->is_pixmap)
xcb_free_pixmap (xtc->c, xtc->drawable);
else