[cairo-commit] src/cairo-xlib-surface-shm.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Jan 8 08:40:39 PST 2013
src/cairo-xlib-surface-shm.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit e4acba6d1ddfe1c6d27b5a77edccea9d69b178f8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Jan 8 16:38:11 2013 +0000
xlib/shm: Only destroy an existing damage
_cairo_damage_destroy() does not like to be passed a NULL.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
index ff0aaf8..d27b2d6 100644
--- a/src/cairo-xlib-surface-shm.c
+++ b/src/cairo-xlib-surface-shm.c
@@ -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))
More information about the cairo-commit
mailing list