[cairo-xlib-surface] Always nullify GC after pushing to screen.

The status return from _cairo_xlib_screen_put_gc() indicates the failure
to queue a job to free an old GC - the current GC is always transferred
away from the caller, so always nullify it in the surface.
This commit is contained in:
Chris Wilson 2007-05-12 09:40:13 +01:00
parent 58c35e6d7b
commit 70611846de

View file

@ -310,12 +310,11 @@ _cairo_xlib_surface_finish (void *abstract_surface)
if (surface->gc != NULL) {
cairo_status_t status2;
status2 = _cairo_xlib_screen_put_gc (surface->screen_info,
surface->depth,
surface->gc,
surface->have_clip_rects);
if (status2 == CAIRO_STATUS_SUCCESS)
surface->gc = NULL;
else if (status == CAIRO_STATUS_SUCCESS)
surface->depth,
surface->gc,
surface->have_clip_rects);
surface->gc = NULL;
if (status == CAIRO_STATUS_SUCCESS)
status = status2;
}