From 14bc3d6717515e0b34b02ef5b5ad4c3ec52ccdc2 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 21 Aug 2022 20:01:12 +0200 Subject: Fix crash on call window closing --- main/src/ui/call_window/call_window_controller.vala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'main/src/ui') diff --git a/main/src/ui/call_window/call_window_controller.vala b/main/src/ui/call_window/call_window_controller.vala index e0eca6dc..3fde9759 100644 --- a/main/src/ui/call_window/call_window_controller.vala +++ b/main/src/ui/call_window/call_window_controller.vala @@ -362,8 +362,11 @@ public class Dino.Ui.CallWindowController : Object { public override void dispose() { foreach (ulong handler_id in call_window_handler_ids) call_window.disconnect(handler_id); foreach (ulong handler_id in bottom_bar_handler_ids) call_window.bottom_bar.disconnect(handler_id); - foreach (string peer_id in participant_widgets.keys) { - remove_participant(peer_id); + + var participant_ids = new ArrayList(); + participant_ids.add_all(participant_widgets.keys); + foreach (string participant_id in participant_ids) { + remove_participant(participant_id); } call_window_handler_ids = bottom_bar_handler_ids = new ulong[0]; -- cgit v1.2.3-70-g09d2