Don't use GConf.Client.get_bool ()
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Thu, 23 Apr 2009 15:44:49 +0000 (18:44 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Thu, 23 Apr 2009 15:50:31 +0000 (18:50 +0300)
When an entry is not found, this method just returns false instead of
signaling an error so we never know if key is not there or it's value is
set to false.

src/rygel/rygel-config-reader.vala

index 4a4e240..7ab2cde 100644 (file)
@@ -116,7 +116,12 @@ public class Rygel.ConfigReader {
         var path = ROOT_GCONF_PATH + section + "/" + key;
 
         try {
-            val = this.gconf.get_bool (path);
+            unowned GConf.Value value = this.gconf.get (path);
+            if (value != null) {
+                val = value.get_bool ();
+            } else {
+                val = default_value;
+            }
         } catch (GLib.Error error) {
             val = default_value;
         }