r3245 - in trunk/src/target/OM-2007.2/applications/openmoko-today2: . src

chris at sita.openmoko.org chris at sita.openmoko.org
Mon Oct 22 19:41:19 CEST 2007


Author: chris
Date: 2007-10-22 19:41:18 +0200 (Mon, 22 Oct 2007)
New Revision: 3245

Modified:
   trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
   trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
Log:
        * src/today-main.c: (wallpaper_notify):
        Check if value is NULL when reading wallpaper setting


Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog	2007-10-22 17:24:07 UTC (rev 3244)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/ChangeLog	2007-10-22 17:41:18 UTC (rev 3245)
@@ -1,5 +1,10 @@
 2007-10-22  Chris Lord  <chris at openedhand.com>
 
+	* src/today-main.c: (wallpaper_notify):
+	Check if value is NULL when reading wallpaper setting
+
+2007-10-22  Chris Lord  <chris at openedhand.com>
+
 	* src/today-main.c: (bg_size_allocate_cb):
 	Check the size against the last allocated size, or we can get into
 	semi-infinite loops

Modified: trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c
===================================================================
--- trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c	2007-10-22 17:24:07 UTC (rev 3244)
+++ trunk/src/target/OM-2007.2/applications/openmoko-today2/src/today-main.c	2007-10-22 17:41:18 UTC (rev 3245)
@@ -172,7 +172,7 @@
 	gint width, height, pwidth, pheight;
 	GdkPixbuf *pixbuf, *pixbuf_scaled;
 	GConfValue *value;
-	const gchar *path;
+	const gchar *path = NULL;
 	gfloat scale;
 
 	if (!GTK_WIDGET_REALIZED (data->bg_ebox))
@@ -186,7 +186,7 @@
 	if ((width <= 0) || (height <= 0)) return;
 	
 	value = gconf_entry_get_value (entry);
-	path = gconf_value_get_string (value);
+	if (value) path = gconf_value_get_string (value);
 	if (!path || (!(pixbuf = gdk_pixbuf_new_from_file (path, NULL)))) {
 		if (data->wallpaper) {
 			g_object_unref (data->wallpaper);





More information about the commitlog mailing list