aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/add_conversation/select_jid_fragment.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2022-08-22 13:08:31 +0200
committerfiaxh <git@lightrise.org>2022-08-22 13:16:46 +0200
commit117f19381233207e4b5aef03c82e7dd4b2d1debd (patch)
tree4accf7d771a74b8cc7ee57d486cafc281f127059 /main/src/ui/add_conversation/select_jid_fragment.vala
parent14bc3d6717515e0b34b02ef5b5ad4c3ec52ccdc2 (diff)
downloaddino-117f19381233207e4b5aef03c82e7dd4b2d1debd.tar.gz
dino-117f19381233207e4b5aef03c82e7dd4b2d1debd.zip
Fix crashes and warning in Join Conference dialog
fixes #1262
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) {