[gtk+] Work around a wayland crash



commit 2761fae728138b28538c0c8a9fa74919129d7b75
Author: Matthias Clasen <mclasen redhat com>
Date:   Thu Mar 30 09:14:05 2017 -0400

    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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkglcontext-wayland.c b/gdk/wayland/gdkglcontext-wayland.c
index 82233cf..7f74a34 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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]