[gtk+] cssnodedeclaration: Only set the id on the widget path if we have one



commit ee1381a1f34b05812e6b226544c286847b947646
Author: Benjamin Otte <otte redhat com>
Date:   Sat Nov 21 02:40:05 2015 +0100

    cssnodedeclaration: Only set the id on the widget path if we have one
    
    Widget paths don't like NULL.

 gtk/gtkcssnodedeclaration.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssnodedeclaration.c b/gtk/gtkcssnodedeclaration.c
index 99ff6b5..bc139ff 100644
--- a/gtk/gtkcssnodedeclaration.c
+++ b/gtk/gtkcssnodedeclaration.c
@@ -623,7 +623,8 @@ gtk_css_node_declaration_add_to_widget_path (const GtkCssNodeDeclaration *decl,
 
   /* Set name and id */
   gtk_widget_path_iter_set_object_name (path, pos, decl->name);
-  gtk_widget_path_iter_set_name (path, pos, decl->id);
+  if (decl->id)
+    gtk_widget_path_iter_set_name (path, pos, decl->id);
 
   /* Set widget regions */
   regions = get_regions (decl);


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