--- gui/simple-greeter/gdm-user.c.orig	2009-09-04 19:35:59.000000000 -0300
+++ gui/simple-greeter/gdm-user.c	2009-09-04 19:20:03.000000000 -0300
@@ -431,6 +431,7 @@
 
                 real_name_utf8 = g_locale_to_utf8 (pwent->pw_gecos, -1, NULL, NULL, NULL);
 
+                if (real_name_utf8) {
                 first_comma = strchr (real_name_utf8, ',');
                 if (first_comma) {
                         real_name = g_strndup (real_name_utf8, first_comma - real_name_utf8);
@@ -446,6 +447,9 @@
         } else {
                 real_name = NULL;
         }
+        } else {
+                real_name = NULL;
+        }
 
         if ((real_name && !user->real_name) ||
             (!real_name && user->real_name) ||
