[brasero] Fix a crash on error with audio/video project
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Fix a crash on error with audio/video project
- Date: Tue, 4 Aug 2009 13:58:13 +0000 (UTC)
commit 309fa7e14af675a517927c47da22472e3e45fa40
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Tue Aug 4 12:13:11 2009 +0200
Fix a crash on error with audio/video project
On error with an audio or a video track remove it right away before displaying the error message otherwise a new message box will be displayed on every session change
src/brasero-audio-disc.c | 8 ++++++--
src/brasero-video-disc.c | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/brasero-audio-disc.c b/src/brasero-audio-disc.c
index db7c48f..6ece074 100644
--- a/src/brasero-audio-disc.c
+++ b/src/brasero-audio-disc.c
@@ -828,6 +828,12 @@ brasero_audio_disc_session_changed (BraseroSessionCfg *session,
gchar *uri;
uri = brasero_track_stream_get_source (track, TRUE);
+
+ /* Remove the track now otherwise on each session change we'll get the
+ * same message over and over again. */
+ brasero_burn_session_remove_track (BRASERO_BURN_SESSION (session),
+ BRASERO_TRACK (track));
+
error = brasero_status_get_error (status);
if (!error)
brasero_audio_disc_file_type_error_dialog (self, uri);
@@ -853,8 +859,6 @@ brasero_audio_disc_session_changed (BraseroSessionCfg *session,
uri,
error);
- brasero_burn_session_remove_track (BRASERO_BURN_SESSION (session),
- BRASERO_TRACK (track));
g_error_free (error);
g_free (uri);
continue;
diff --git a/src/brasero-video-disc.c b/src/brasero-video-disc.c
index c23d837..d1fed23 100644
--- a/src/brasero-video-disc.c
+++ b/src/brasero-video-disc.c
@@ -450,6 +450,12 @@ brasero_video_disc_session_changed (BraseroSessionCfg *session,
gchar *uri;
uri = brasero_track_stream_get_source (track, TRUE);
+
+ /* Remove the track now otherwise on each session change we'll get the
+ * same message over and over again. */
+ brasero_burn_session_remove_track (BRASERO_BURN_SESSION (session),
+ BRASERO_TRACK (track));
+
error = brasero_status_get_error (status);
if (!error)
brasero_video_disc_unreadable_uri_dialog (self, uri, error);
@@ -465,8 +471,6 @@ brasero_video_disc_session_changed (BraseroSessionCfg *session,
else
brasero_video_disc_unreadable_uri_dialog (self, uri, error);
- brasero_burn_session_remove_track (BRASERO_BURN_SESSION (session),
- BRASERO_TRACK (track));
g_error_free (error);
g_free (uri);
continue;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]