brasero r1421 - in trunk: . src



Author: philippr
Date: Sat Oct 25 09:23:23 2008
New Revision: 1421
URL: http://svn.gnome.org/viewvc/brasero?rev=1421&view=rev

Log:
	Fix #556146 â brasero crashed with SIGSEGV in g_main_context_dispatch()
	Fixed a crash when the mime type detection failed

	* src/brasero-player.c (brasero_player_metadata_completed):


Modified:
   trunk/ChangeLog
   trunk/src/brasero-player.c

Modified: trunk/src/brasero-player.c
==============================================================================
--- trunk/src/brasero-player.c	(original)
+++ trunk/src/brasero-player.c	Sat Oct 25 09:23:23 2008
@@ -876,6 +876,7 @@
 				   gpointer null_data)
 {
 	BraseroPlayer *player = BRASERO_PLAYER (obj);
+	const gchar *mime;
 
 	if (player->priv->pixbuf) {
 		gtk_image_set_from_pixbuf (GTK_IMAGE (player->priv->image_display), NULL);
@@ -894,6 +895,8 @@
 		return;
 	}
 
+	mime = g_file_info_get_content_type (info);
+
 	/* based on the mime type, we try to determine the type of file */
 	if (g_file_info_get_attribute_boolean (info, BRASERO_IO_HAS_VIDEO)) {
 		/* video */
@@ -920,7 +923,7 @@
 		else
 			gtk_widget_set_sensitive (player->priv->progress, FALSE);
 	}
-	else if (!strncmp ("image/", g_file_info_get_content_type (info), 6)) {
+	else if (mime && !strncmp ("image/", mime, 6)) {
 		brasero_player_image (player);
 		return;
 	}



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