[gtk/wip/otte/for-master: 83/96] glrenderer: Handle NULL debug messages



commit 6c473d5ff71bd6b74476b7bf0fa20687a3af160b
Author: Benjamin Otte <otte redhat com>
Date:   Tue May 21 05:41:06 2019 +0200

    glrenderer: Handle NULL debug messages

 gsk/gl/gskglrenderer.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 1a9f20bf02..3a57fb1eef 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -2605,11 +2605,16 @@ gsk_gl_renderer_add_render_ops (GskGLRenderer   *self,
     break;
 
     case GSK_DEBUG_NODE:
-      ops_push_debug_group (builder, gsk_debug_node_get_message (node));
-      gsk_gl_renderer_add_render_ops (self,
-                                      gsk_debug_node_get_child (node),
-                                      builder);
-      ops_pop_debug_group (builder);
+      {
+        const char *message = gsk_debug_node_get_message (node);
+        if (message)
+          ops_push_debug_group (builder, message);
+        gsk_gl_renderer_add_render_ops (self,
+                                        gsk_debug_node_get_child (node),
+                                        builder);
+        if (message)
+          ops_pop_debug_group (builder);
+      }
     break;
 
     case GSK_COLOR_NODE:


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