From 117f19381233207e4b5aef03c82e7dd4b2d1debd Mon Sep 17 00:00:00 2001 From: fiaxh Date: Mon, 22 Aug 2022 13:08:31 +0200 Subject: Fix crashes and warning in Join Conference dialog fixes #1262 --- main/src/ui/add_conversation/select_jid_fragment.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'main/src/ui/add_conversation/select_jid_fragment.vala') 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) { -- cgit v1.3