diff options
author | fiaxh <git@mx.ax.lt> | 2017-08-16 11:44:42 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-08-17 01:26:03 +0200 |
commit | fb36ea055301b6db513a31acde30f315e2c0fd68 (patch) | |
tree | e9bfeecc12a3824e3b9a86abbed44856ef6dd1e0 /main/src/ui/occupant_menu | |
parent | 30818b3965aef36f161147881967006d6e9376a6 (diff) | |
download | dino-fb36ea055301b6db513a31acde30f315e2c0fd68.tar.gz dino-fb36ea055301b6db513a31acde30f315e2c0fd68.zip |
Message Archive Management
Diffstat (limited to 'main/src/ui/occupant_menu')
-rw-r--r-- | main/src/ui/occupant_menu/list.vala | 8 |
1 files changed, 5 insertions, 3 deletions
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){ |