cssnodedeclaration: Only set the id on the widget path if we have one

Widget paths don't like NULL.
This commit is contained in:
Benjamin Otte 2015-11-21 02:40:05 +01:00
parent adead3b499
commit ee1381a1f3

View File

@ -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);