From 2761fae728138b28538c0c8a9fa74919129d7b75 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 30 Mar 2017 09:14:05 -0400 Subject: [PATCH] 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. --- gdk/wayland/gdkglcontext-wayland.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdk/wayland/gdkglcontext-wayland.c b/gdk/wayland/gdkglcontext-wayland.c index 82233cfb20..7f74a34f94 100644 --- a/gdk/wayland/gdkglcontext-wayland.c +++ b/gdk/wayland/gdkglcontext-wayland.c @@ -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);