mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 01:48:07 +02:00
xlib/shm: Only destroy an existing damage
_cairo_damage_destroy() does not like to be passed a NULL. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
2ed484817e
commit
e4acba6d1d
1 changed files with 4 additions and 2 deletions
|
|
@ -710,8 +710,10 @@ _cairo_xlib_shm_surface_finish (void *abstract_surface)
|
|||
cairo_xlib_display_t *display;
|
||||
cairo_status_t status;
|
||||
|
||||
_cairo_damage_destroy (shm->image.base.damage);
|
||||
shm->image.base.damage = _cairo_damage_create_in_error (CAIRO_STATUS_SURFACE_FINISHED);
|
||||
if (shm->image.base.damage) {
|
||||
_cairo_damage_destroy (shm->image.base.damage);
|
||||
shm->image.base.damage = _cairo_damage_create_in_error (CAIRO_STATUS_SURFACE_FINISHED);
|
||||
}
|
||||
|
||||
status = _cairo_xlib_display_acquire (shm->image.base.device, &display);
|
||||
if (unlikely (status))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue