Create the groups ArrayList before any dbus calls.
authorZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Mon, 19 Jan 2009 21:53:38 +0000 (21:53 +0000)
committerZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Mon, 19 Jan 2009 21:53:38 +0000 (21:53 +0000)
Work around for a crasher bug caused by missing null-check in Vala.

svn path=/trunk/; revision=472

src/plugins/dvb/rygel-dvb-content-dir.vala

index f542e23..20e684b 100644 (file)
@@ -55,6 +55,8 @@ public class Rygel.DVBContentDir : ContentDirectory {
             return;
         }
 
+        this.groups = new ArrayList<DVBChannelGroup> ();
+
         // Get a proxy to DVB Manager object
         this.manager = connection.get_object (DVBContentDir.DVB_SERVICE,
                                               DVBContentDir.MANAGER_PATH,
@@ -68,7 +70,6 @@ public class Rygel.DVBContentDir : ContentDirectory {
             return;
         }
 
-        this.groups = new ArrayList<DVBChannelGroup> ();
         foreach (uint group_id in dev_groups) {
             string channel_list_path = null;
             string group_name =  null;