ui: Handle null from interface combo
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Thu, 10 Feb 2011 23:53:57 +0000 (01:53 +0200)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Fri, 11 Feb 2011 00:18:32 +0000 (02:18 +0200)
src/ui/rygel-writable-user-config.vala

index 6544209..6b2fd84 100644 (file)
@@ -44,8 +44,16 @@ public class Rygel.WritableUserConfig : Rygel.UserConfig {
         }
     }
 
-    public void set_interface (string value) {
-        this.set_string ("general", IFACE_KEY, value);
+    public void set_interface (string? value) {
+        string iface;
+
+        if (value != null) {
+            iface = value;
+        } else {
+            iface = "";
+        }
+
+        this.set_string ("general", IFACE_KEY, iface);
     }
 
     public void set_port (int value) {