[Xfce4-commits] [apps/xfburn] 03/04: Bugfix: Better handling of inaccessible drive.

noreply at xfce.org noreply at xfce.org
Tue Mar 25 14:18:18 CET 2014


This is an automated email from the git hooks/post-receive script.

squisher pushed a commit to branch master
in repository apps/xfburn.

commit 2db1dd16660007102b9168bb4ca71e66753d8877
Author: David Mohr <david at mcbf.net>
Date:   Mon Mar 24 23:37:44 2014 -0600

    Bugfix: Better handling of inaccessible drive.
    
    Improves 75557169edbb5f499ed97b6bc8708f96f8469d4c,
    thanks Thomas.
---
 xfburn/xfburn-device-box.c |   20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/xfburn/xfburn-device-box.c b/xfburn/xfburn-device-box.c
index 85feff1..6cf937d 100644
--- a/xfburn/xfburn-device-box.c
+++ b/xfburn/xfburn-device-box.c
@@ -520,20 +520,24 @@ ask_for_blanking (XfburnDeviceBoxPrivate *priv)
 static gboolean
 check_disc_validity (XfburnDeviceBoxPrivate *priv)
 {
-  enum burn_disc_status disc_status;
-  int profile_no;
-  gchar *profile_name;
-  gboolean is_erasable;
-  XfburnDevice *device;
+  enum burn_disc_status disc_status = BURN_DISC_UNREADY;
+  int profile_no = 0;
+  gchar *profile_name = NULL;
+  gboolean is_erasable = FALSE;
+  XfburnDevice *device = NULL;
 
   g_object_get (G_OBJECT (priv->devlist), "current-device", &device, NULL);
 
+  if (device == NULL)
+    return FALSE;
+
   g_object_get (G_OBJECT (device), "disc-status", &disc_status, "profile-no", &profile_no, 
                                    "erasable", &is_erasable, "profile-name", &profile_name,
                                    NULL);
-  
-  gtk_label_set_text (GTK_LABEL (priv->disc_label), profile_name);
-  g_free (profile_name);
+  if (profile_name != NULL) {
+    gtk_label_set_text (GTK_LABEL (priv->disc_label), profile_name);
+    g_free (profile_name);
+  }
 
   DBG ("blank_mode = %d", priv->blank_mode);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list