mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 09:58:12 +02:00
[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:
parent
58c35e6d7b
commit
70611846de
1 changed files with 5 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue