[gnome-builder] gstyle-rename-popover: allow NULL name



commit a1aa469bd74b49bdd0c10c50958423353dc80d70
Author: Sebastien Lafargue <slafargue gnome org>
Date:   Mon Jul 18 16:47:54 2016 +0200

    gstyle-rename-popover: allow NULL name
    
    If the color/palette name is NULL,
    we set it to an empty string
    
    This is the case when we try to rename a color
    with no name.

 contrib/gstyle/gstyle-rename-popover.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/contrib/gstyle/gstyle-rename-popover.c b/contrib/gstyle/gstyle-rename-popover.c
index ad2d971..70c0fa1 100644
--- a/contrib/gstyle/gstyle-rename-popover.c
+++ b/contrib/gstyle/gstyle-rename-popover.c
@@ -179,11 +179,10 @@ gstyle_rename_popover_set_name (GstyleRenamePopover *self,
                                 const gchar         *name)
 {
   g_assert (GSTYLE_IS_RENAME_POPOVER (self));
-  g_assert (name != NULL);
 
   if (g_strcmp0 (gtk_entry_get_text (self->entry), name) != 0)
     {
-      if (gstyle_str_empty0 (name))
+      if (name == NULL || gstyle_str_empty0 (name))
         gtk_entry_set_text (self->entry, "");
       else
         gtk_entry_set_text (self->entry, name);


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