Work around a wayland crash

For some reason, we are seeing damage being NULL here.
While that should never be the case, crashing on it is
unkind and makes the Wayland experience unusable.
This commit is contained in:
Matthias Clasen 2017-03-30 09:14:05 -04:00
parent e70380a4dd
commit 2761fae728

View File

@ -221,7 +221,7 @@ gdk_wayland_gl_context_end_frame (GdkDrawContext *draw_context,
egl_surface = gdk_wayland_window_get_egl_surface (window->impl_window,
context_wayland->egl_config);
if (display_wayland->have_egl_swap_buffers_with_damage)
if (display_wayland->have_egl_swap_buffers_with_damage && damage != NULL)
{
int i, j, n_rects = cairo_region_num_rectangles (damage);
EGLint *rects = g_new (EGLint, n_rects * 4);