[brasero] Fix a problem with burn-uri plugin when it tried to deal with the .toc file for a .bin image (which



commit dd87d3c2fe005f14780e6a809e665efd3b918f52
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Mon Aug 3 14:09:58 2009 +0200

    Fix a problem with burn-uri plugin when it tried to deal with the .toc file for a .bin image (which doesn't exist of course)

 plugins/local-track/burn-uri.c |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/plugins/local-track/burn-uri.c b/plugins/local-track/burn-uri.c
index 1f3bdf2..89a9766 100644
--- a/plugins/local-track/burn-uri.c
+++ b/plugins/local-track/burn-uri.c
@@ -246,6 +246,9 @@ brasero_burn_uri_retrieve_path (BraseroBurnURI *self,
 
 	priv = BRASERO_BURN_URI_PRIVATE (self);
 
+	if (!uri)
+		return FALSE;
+
 	file = g_file_new_for_uri (uri);
 	info = g_file_query_info (file,
 				  G_FILE_ATTRIBUTE_STANDARD_NAME ","
@@ -336,12 +339,15 @@ brasero_burn_uri_thread (gpointer data)
 
 		path_toc = NULL;
 		uri = brasero_track_image_get_toc_source (BRASERO_TRACK_IMAGE (current), TRUE);
-		if (!brasero_burn_uri_retrieve_path (self, uri, &path_toc)) {
-			g_free (path_image);
+		if (uri) {
+			/* NOTE: if it's a .bin image there is not .toc file */
+			if (!brasero_burn_uri_retrieve_path (self, uri, &path_toc)) {
+				g_free (path_image);
+				g_free (uri);
+				goto end;
+			}
 			g_free (uri);
-			goto end;
 		}
-		g_free (uri);
 
 		brasero_track_get_size (current, &blocks, NULL);
 



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