[Goodies-commits] r4713 - in xfce4-datetime-plugin/trunk: . panel-plugin

Diego Ongaro ongardie at xfce.org
Fri May 2 21:48:28 CEST 2008


Author: ongardie
Date: 2008-05-02 19:48:28 +0000 (Fri, 02 May 2008)
New Revision: 4713

Modified:
   xfce4-datetime-plugin/trunk/ChangeLog
   xfce4-datetime-plugin/trunk/panel-plugin/datetime.c
Log:
handle NULL from xfce_rc_simple_open


Modified: xfce4-datetime-plugin/trunk/ChangeLog
===================================================================
--- xfce4-datetime-plugin/trunk/ChangeLog	2008-05-02 19:48:19 UTC (rev 4712)
+++ xfce4-datetime-plugin/trunk/ChangeLog	2008-05-02 19:48:28 UTC (rev 4713)
@@ -1,4 +1,5 @@
 2008-05-02  Diego Ongaro <ongardie at gmail.com>
+    * panel-plugin/datetime.c: handle NULL from xfce_rc_simple_open
     * panel-plugin/datetime.h: Use GtkTooltips type (fixes build)
 
 2007-04-07  Remco den Breeje <remco at sx.mine.nu>

Modified: xfce4-datetime-plugin/trunk/panel-plugin/datetime.c
===================================================================
--- xfce4-datetime-plugin/trunk/panel-plugin/datetime.c	2008-05-02 19:48:19 UTC (rev 4712)
+++ xfce4-datetime-plugin/trunk/panel-plugin/datetime.c	2008-05-02 19:48:28 UTC (rev 4713)
@@ -535,13 +535,17 @@
   rc = xfce_rc_simple_open(file, FALSE);
   g_free(file);
 
-  xfce_rc_write_int_entry(rc, "layout", dt->layout);
-  xfce_rc_write_entry(rc, "date_font", dt->date_font);
-  xfce_rc_write_entry(rc, "time_font", dt->time_font);
-  xfce_rc_write_entry(rc, "date_format", dt->date_format);
-  xfce_rc_write_entry(rc, "time_format", dt->time_format);
+  if(rc != NULL)
+  {
+    xfce_rc_write_int_entry(rc, "layout", dt->layout);
+    xfce_rc_write_entry(rc, "date_font", dt->date_font);
+    xfce_rc_write_entry(rc, "time_font", dt->time_font);
+    xfce_rc_write_entry(rc, "date_format", dt->date_format);
+    xfce_rc_write_entry(rc, "time_format", dt->time_format);
 
-  xfce_rc_close(rc);
+    xfce_rc_close(rc);
+  }
+
 }
 
 /*




More information about the Goodies-commits mailing list