[sound-juicer/gnome-2-26] Fix warning on startup unref'ing the drive



commit 396df96b43f10b57709c4a33c1a86b48380c7b8d
Author: Bastien Nocera <hadess hadess net>
Date:   Thu May 7 22:46:50 2009 +0100

    Fix warning on startup unref'ing the drive
    
    When the drive in GConf doesn't exist, don't try to unref it.
---
 src/sj-main.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/sj-main.c b/src/sj-main.c
index 787b1e5..d7249d8 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -1072,7 +1072,8 @@ gboolean cd_drive_exists (const char *device)
   monitor = brasero_medium_monitor_get_default ();
   drive = brasero_medium_monitor_get_drive (monitor, device);
   exists = (drive != NULL);
-  g_object_unref (drive);
+  if (exists)
+    g_object_unref (drive);
 
   return exists;
 }



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