[brasero] Silenced a warning
- From: Philippe Rouquier <philippr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [brasero] Silenced a warning
- Date: Fri, 4 Sep 2009 18:16:39 +0000 (UTC)
commit 5fbec4aeb41c816e22d7dffc4fce95065e42ea61
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date: Fri Sep 4 12:25:43 2009 +0200
Silenced a warning
libbrasero-burn/brasero-session.c | 3 +++
libbrasero-burn/burn-job.c | 6 ++++++
2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libbrasero-burn/brasero-session.c b/libbrasero-burn/brasero-session.c
index c0f9dd9..1d0f6f9 100644
--- a/libbrasero-burn/brasero-session.c
+++ b/libbrasero-burn/brasero-session.c
@@ -765,6 +765,9 @@ brasero_burn_session_get_rate (BraseroBurnSession *self)
return 0;
medium = brasero_drive_get_medium (priv->settings->burner);
+ if (!medium)
+ return 0;
+
max_rate = brasero_medium_get_max_write_speed (medium);
if (priv->settings->rate <= 0)
return max_rate;
diff --git a/libbrasero-burn/burn-job.c b/libbrasero-burn/burn-job.c
index 216a9a8..79ffc5e 100644
--- a/libbrasero-burn/burn-job.c
+++ b/libbrasero-burn/burn-job.c
@@ -1666,6 +1666,9 @@ brasero_job_get_max_rate (BraseroJob *self, guint64 *rate)
drive = brasero_burn_session_get_burner (session);
medium = brasero_drive_get_medium (drive);
+ if (!medium)
+ return BRASERO_BURN_NOT_READY;
+
*rate = brasero_medium_get_max_write_speed (medium);
return BRASERO_BURN_OK;
@@ -1690,6 +1693,9 @@ brasero_job_get_max_speed (BraseroJob *self, guint *speed)
drive = brasero_burn_session_get_burner (session);
medium = brasero_drive_get_medium (drive);
+ if (!medium)
+ return BRASERO_BURN_NOT_READY;
+
rate = brasero_medium_get_max_write_speed (medium);
media = brasero_medium_get_status (medium);
if (media & BRASERO_MEDIUM_DVD)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]