From fb36ea055301b6db513a31acde30f315e2c0fd68 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Wed, 16 Aug 2017 11:44:42 +0200 Subject: Message Archive Management --- main/src/ui/occupant_menu/list.vala | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'main/src/ui/occupant_menu') diff --git a/main/src/ui/occupant_menu/list.vala b/main/src/ui/occupant_menu/list.vala index 42ff3da6..aeea7c26 100644 --- a/main/src/ui/occupant_menu/list.vala +++ b/main/src/ui/occupant_menu/list.vala @@ -84,10 +84,12 @@ public class List : Box { private void header(ListBoxRow row, ListBoxRow? before_row) { ListRow c1 = row as ListRow; - Xmpp.Xep.Muc.Affiliation a1 = stream_interactor.get_module(MucManager.IDENTITY).get_affiliation(conversation.counterpart, c1.jid, c1.account); + Xmpp.Xep.Muc.Affiliation? a1 = stream_interactor.get_module(MucManager.IDENTITY).get_affiliation(conversation.counterpart, c1.jid, c1.account); + if (a1 == null) return; + if (before_row != null) { - ListRow c2 = before_row as ListRow; - Xmpp.Xep.Muc.Affiliation a2 = stream_interactor.get_module(MucManager.IDENTITY).get_affiliation(conversation.counterpart, c2.jid, c2.account); + ListRow c2 = (ListRow) before_row; + Xmpp.Xep.Muc.Affiliation? a2 = stream_interactor.get_module(MucManager.IDENTITY).get_affiliation(conversation.counterpart, c2.jid, c2.account); if (a1 != a2) { row.set_header(generate_header_widget(a1, false)); } else if (row.get_header() != null){ -- cgit v1.2.3-54-g00ecf