[sound-juicer] Fix warning on startup unref'ing the drive
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Subject: [sound-juicer] Fix warning on startup unref'ing the drive
- Date: Thu, 7 May 2009 17:55:08 -0400 (EDT)
commit d4b6249d494acbdcff001ff43072f504d187b19f
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 e7a44ee..ac4fa12 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -1070,7 +1070,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]