From dd4d6af1854f71aefcfcca6112288eedcbdf3301 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Sun, 27 Apr 2014 16:12:02 +0200 Subject: [PATCH] wayland-surface: Only call process_damage when we have any damage This fixes a crash when a client commits a surface without attaching a buffer. --- src/wayland/meta-wayland-surface.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 483c0c714..3a8a077d4 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -311,7 +311,8 @@ commit_pending_state (MetaWaylandSurface *surface, } } - surface_process_damage (surface, pending->damage); + if (!cairo_region_is_empty (pending->damage)) + surface_process_damage (surface, pending->damage); if (pending->opaque_region) meta_surface_actor_set_opaque_region (surface->surface_actor, pending->opaque_region);