wayland-surface: Ignore bufferless damage

Instead of letting a buggy client kill us.
This commit is contained in:
Adel Gadllah 2014-04-27 16:18:09 +02:00
parent dd4d6af185
commit c8d0a66921

View File

@ -108,6 +108,10 @@ surface_process_damage (MetaWaylandSurface *surface,
int i, n_rectangles;
cairo_rectangle_int_t buffer_rect;
/* Damage without a buffer makes no sense so ignore that, otherwise we would crash */
if (!surface->buffer)
return;
buffer_rect.x = 0;
buffer_rect.y = 0;
buffer_rect.width = cogl_texture_get_width (surface->buffer->texture);