[Xfce4-commits] r29277 - xfce4-settings/trunk/xfsettingsd

Stephan Arts stephan at xfce.org
Mon Jan 19 20:29:10 CET 2009


Author: stephan
Date: 2009-01-19 19:29:09 +0000 (Mon, 19 Jan 2009)
New Revision: 29277

Modified:
   xfce4-settings/trunk/xfsettingsd/registry.c
Log:
Fix bug #4797 (Patch by Lars-Peter Clausen)
(Fix segfault)


Modified: xfce4-settings/trunk/xfsettingsd/registry.c
===================================================================
--- xfce4-settings/trunk/xfsettingsd/registry.c	2009-01-18 21:51:46 UTC (rev 29276)
+++ xfce4-settings/trunk/xfsettingsd/registry.c	2009-01-19 19:29:09 UTC (rev 29277)
@@ -302,13 +302,15 @@
     if (G_LIKELY (filename))
     {
         /* create file contents */
+        const gchar *xft_rgba = g_value_get_string (&properties[XSETTING_ENTRY_XFT_RGBA].value);
+        
         string = g_string_sized_new (80);
         g_string_append_printf (string, "Xft.antialias: %d\n"
                                         "Xft.hinting: %d\n"
                                         "Xft.rgba: %s\n",
                                         g_value_get_int (&properties[XSETTING_ENTRY_XFT_ANTIALIAS].value),
                                         g_value_get_int (&properties[XSETTING_ENTRY_XFT_HINTING].value),
-                                        g_value_get_string (&properties[XSETTING_ENTRY_XFT_RGBA].value));
+                                        xft_rgba ? xft_rgba : "");
         
         if (g_value_get_int (&properties[XSETTING_ENTRY_XFT_HINTING].value))
             g_string_append_printf (string, "Xft.hintstyle: %s\n", g_value_get_string (&properties[XSETTING_ENTRY_XFT_HINTSTYLE].value));
@@ -355,10 +357,12 @@
     if (G_LIKELY (filename))
     {
         /* build file contents */
+        const gchar *cursor_theme_name = g_value_get_string (&properties[XSETTING_ENTRY_GTK_CURSORTHEMENAME].value);
+        
         contents = g_strdup_printf ("Xcursor.theme: %s\n"
                                     "Xcursor.theme_core: true\n"
                                     "Xcursor.size: %d\n",
-                                    g_value_get_string (&properties[XSETTING_ENTRY_GTK_CURSORTHEMENAME].value),
+                                    cursor_theme_name ? cursor_theme_name : "",
                                     g_value_get_int (&properties[XSETTING_ENTRY_GTK_CURSORTHEMESIZE].value));
         
         /* write the contents to the file */




More information about the Xfce4-commits mailing list