gucharmap r1757 - trunk/gucharmap



Author: chpe
Date: Mon Mar 31 12:43:50 2008
New Revision: 1757
URL: http://svn.gnome.org/viewvc/gucharmap?rev=1757&view=rev

Log:
Return NULL for empty font string.


Modified:
   trunk/gucharmap/gucharmap-settings.c

Modified: trunk/gucharmap/gucharmap-settings.c
==============================================================================
--- trunk/gucharmap/gucharmap-settings.c	(original)
+++ trunk/gucharmap/gucharmap-settings.c	Mon Mar 31 12:43:50 2008
@@ -129,11 +129,19 @@
 gchar *
 gucharmap_settings_get_font (void)
 {
+  char *font;
+
   if (!gucharmap_settings_initialized ()) {
       return get_default_font ();
   }
   
-  return gconf_client_get_string (client, GCONF_PREFIX"/font", NULL);
+  font = gconf_client_get_string (client, GCONF_PREFIX"/font", NULL);
+  if (!font || !font[0]) {
+    g_free (font);
+    return NULL;
+  }
+
+  return font;
 }
 
 void



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