brasero r1086 - in trunk: . src/plugins/cdrdao



Author: philippr
Date: Thu Aug 14 11:55:58 2008
New Revision: 1086
URL: http://svn.gnome.org/viewvc/brasero?rev=1086&view=rev

Log:
	Fix #547616 â brasero crashed with SIGSEGV in brasero_track_get_toc_source()
	Any message received during erasing caused crashes with cdrdao

	* src/plugins/cdrdao/burn-cdrdao.c
	(brasero_cdrdao_read_stderr_record):

Modified:
   trunk/ChangeLog
   trunk/src/plugins/cdrdao/burn-cdrdao.c

Modified: trunk/src/plugins/cdrdao/burn-cdrdao.c
==============================================================================
--- trunk/src/plugins/cdrdao/burn-cdrdao.c	(original)
+++ trunk/src/plugins/cdrdao/burn-cdrdao.c	Thu Aug 14 11:55:58 2008
@@ -152,11 +152,24 @@
 		brasero_job_set_dangerous (BRASERO_JOB (cdrdao), TRUE);
 	}
 	else {
-		gchar *cuepath, *name;
-		BraseroTrack *track;
+		gchar *name = NULL;
+		gchar *cuepath = NULL;
+		BraseroTrack *track = NULL;
+		BraseroJobAction action;
+
+		/* Try to catch error could not find cue file */
+
+		/* Track could be NULL here if we're simply blanking a medium */
+		brasero_job_get_action (BRASERO_JOB (cdrdao), &action);
+		if (action == BRASERO_JOB_ACTION_ERASE)
+			return TRUE;
 
 		brasero_job_get_current_track (BRASERO_JOB (cdrdao), &track);
+		if (!track)
+			return FALSE;
+
 		cuepath = brasero_track_get_toc_source (track, FALSE);
+
 		if (!cuepath)
 			return FALSE;
 



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