From ac24f40fcae2a1e7fc44d36e5f8448ec1cbe4120 Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Sat, 16 Feb 2013 14:20:33 +0100 Subject: [PATCH] Consistently treat no groups as group "General" --- src/gui/gtk/JubGtkRosterUI.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/gtk/JubGtkRosterUI.m b/src/gui/gtk/JubGtkRosterUI.m index 99e5144..a742ba3 100644 --- a/src/gui/gtk/JubGtkRosterUI.m +++ b/src/gui/gtk/JubGtkRosterUI.m @@ -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), -- 2.39.5