[rygel] ui: Handle null from interface combo



commit 5d7d4e18e1cf80c14bbb353b49628446009de9c9
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Feb 11 01:53:57 2011 +0200

    ui: Handle null from interface combo

 src/ui/rygel-writable-user-config.vala |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/ui/rygel-writable-user-config.vala b/src/ui/rygel-writable-user-config.vala
index 6544209..6b2fd84 100644
--- a/src/ui/rygel-writable-user-config.vala
+++ b/src/ui/rygel-writable-user-config.vala
@@ -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) {



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