Compare the strings, not the pointers.
authorTor Lillqvist <tml@novell.com>
Thu, 8 Dec 2005 07:59:00 +0000 (07:59 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Thu, 8 Dec 2005 07:59:00 +0000 (07:59 +0000)
2005-12-08  Tor Lillqvist  <tml@novell.com>

* libedataserver/e-source-group.c (e_source_group_set_name):
Compare the strings, not the pointers.

ChangeLog
libedataserver/e-source-group.c

index f065e14..307321a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
        * libedataserver/e-db3-utils.c
        * libedataserver/e-file-cache.c: Use gstdio wrappers.
 
+       * libedataserver/e-source-group.c (e_source_group_set_name):
+       Compare the strings, not the pointers.
+
        * libedataserver/e-xml-utils.c
        * libedataserver/e-xml-utils.h: New files.
        (e_xml_parse_file): Replacement for xmlParseFile(). Needed because
index 49865e1..6322aca 100644 (file)
@@ -435,7 +435,8 @@ e_source_group_set_name (ESourceGroup *group,
        if (group->priv->readonly)
                return;
        
-       if (group->priv->name == name)
+       if (group->priv->name != NULL &&
+           strcmp (group->priv->name, name) == 0)
                return;
 
        g_free (group->priv->name);