[Xfce4-commits] <xfconf:master> Use g_strcmp0 for comparing strings.

Nick Schermer noreply at xfce.org
Mon Feb 1 11:58:01 CET 2010


Updating branch refs/heads/master
         to 96984ae53774f2a0d230ec5d81aded3cfc3ac01c (commit)
       from 37d1b93d84286f31a2d350cf852eea7ba9e58ba2 (commit)

commit 96984ae53774f2a0d230ec5d81aded3cfc3ac01c
Author: Nick Schermer <nick at xfce.org>
Date:   Mon Feb 1 11:51:28 2010 +0100

    Use g_strcmp0 for comparing strings.
    
    g_utf8_collate is for sorting strings and not NULL-safe. This triggered
    a crash in the panel when writting NULL to a property that has an
    xfconf binding attached to it.

 common/xfconf-gvaluefuncs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/xfconf-gvaluefuncs.c b/common/xfconf-gvaluefuncs.c
index df5a9ae..e8a3d92 100644
--- a/common/xfconf-gvaluefuncs.c
+++ b/common/xfconf-gvaluefuncs.c
@@ -327,7 +327,7 @@ _xfconf_gvalue_is_equal(const GValue *value1,
         HANDLE_CMP_GV(DOUBLE, double);
 
         case G_TYPE_STRING:
-            return !g_utf8_collate(g_value_get_string(value1), g_value_get_string(value2));
+            return !g_strcmp0(g_value_get_string(value1), g_value_get_string(value2));
 
         default:
             if(G_VALUE_TYPE(value1) == XFCONF_TYPE_INT16)



More information about the Xfce4-commits mailing list