gnome-applets r11394 - branches/gnome-2-26/drivemount



Author: callum
Date: Fri Mar 20 03:40:27 2009
New Revision: 11394
URL: http://svn.gnome.org/viewvc/gnome-applets?rev=11394&view=rev

Log:
Check that we get a valid response from gconf
when asking for the play command. Bug 340410.  Also avoid a crash
when no icons can be found.

Modified:
   branches/gnome-2-26/drivemount/ChangeLog
   branches/gnome-2-26/drivemount/drive-button.c

Modified: branches/gnome-2-26/drivemount/drive-button.c
==============================================================================
--- branches/gnome-2-26/drivemount/drive-button.c	(original)
+++ branches/gnome-2-26/drivemount/drive-button.c	Fri Mar 20 03:40:27 2009
@@ -311,7 +311,7 @@
     GtkIconInfo *icon_info;
     GIcon *icon;
     int width, height;
-    GdkPixbuf *pixbuf, *scaled;
+    GdkPixbuf *pixbuf = NULL, *scaled;
     GtkRequisition button_req, image_req;
     char *display_name, *tip;
 
@@ -803,8 +803,10 @@
 	GConfClient *gconf_client = gconf_client_get_default ();
 	char *command = gconf_client_get_string (gconf_client,
 			autoplay_key, NULL);
-	run_command (self, command);
-	g_free (command);
+	if (command) {
+	        run_command (self, command);
+		g_free (command);
+	}
 	g_object_unref (gconf_client);
 }
 



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