]> git.babelmonkeys.de Git - jubjub.git/commitdiff
Consistently treat no groups as group "General"
authorFlorian Zeitz <florob@babelmonkeys.de>
Sat, 16 Feb 2013 13:20:33 +0000 (14:20 +0100)
committerFlorian Zeitz <florob@babelmonkeys.de>
Sat, 16 Feb 2013 13:20:33 +0000 (14:20 +0100)
src/gui/gtk/JubGtkRosterUI.m

index 99e51446e75486d6a6f97bafd732c0d9c83c5c8f..a742ba33b3bb2e8e37fa6d6cf3b4208227985364 100644 (file)
@@ -350,8 +350,12 @@ static gboolean filter_roster_by_presence(GtkTreeModel *model,
                GtkTreeRowReference *ref;
                OFString *bareJID = [contact.rosterItem.JID bareJID];
                OFMapTable *contactRows = [_contactMap objectForKey: bareJID];
+               OFArray *groups = contact.rosterItem.groups;;
 
-               for (OFString *group in contact.rosterItem.groups) {
+               if (groups == nil)
+                       groups = @[ @"General" ];
+
+               for (OFString *group in groups) {
                        ref = [contactRows valueForKey: group];
                        path = gtk_tree_row_reference_get_path(ref);
                        gtk_tree_model_get_iter(GTK_TREE_MODEL(_roster_model),