aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/add_conversation/select_jid_fragment.vala
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/add_conversation/select_jid_fragment.vala')
-rw-r--r--main/src/ui/add_conversation/select_jid_fragment.vala6
1 files changed, 5 insertions, 1 deletions
diff --git a/main/src/ui/add_conversation/select_jid_fragment.vala b/main/src/ui/add_conversation/select_jid_fragment.vala
index a6cf0864..25b0b11f 100644
--- a/main/src/ui/add_conversation/select_jid_fragment.vala
+++ b/main/src/ui/add_conversation/select_jid_fragment.vala
@@ -44,7 +44,11 @@ public class SelectJidFragment : Gtk.Box {
list.row_selected.connect(() => { done = true; }); // just for notifying
entry.changed.connect(() => { set_filter(entry.text); });
add_button.clicked.connect(() => { add_jid(); });
- remove_button.clicked.connect(() => { remove_jid(list.get_selected_row() as ListRow); });
+ remove_button.clicked.connect(() => {
+ var list_row = list.get_selected_row();
+ if (list_row == null) return;
+ remove_jid(list_row.child as ListRow);
+ });
}
public void set_filter(string str) {