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.
This commit is contained in:
Adel Gadllah 2014-04-27 16:12:02 +02:00
parent 1016e2555a
commit dd4d6af185

View File

@ -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);