From 4fca033943501fe0487f63178be7cfe845a3e9c2 Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Wed, 18 Mar 2026 17:17:11 +0100 Subject: [PATCH] try to fix crash in polishItems when changing conference layout --- .../Control/Container/Call/CallLayout.qml | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/Linphone/view/Control/Container/Call/CallLayout.qml b/Linphone/view/Control/Container/Call/CallLayout.qml index 607f623b7..39524ed68 100644 --- a/Linphone/view/Control/Container/Call/CallLayout.qml +++ b/Linphone/view/Control/Container/Call/CallLayout.qml @@ -50,19 +50,21 @@ Item { } function setConferenceLayout() { - callLayout.sourceComponent = undefined // unload old view before opening the new view to avoid conflicts in Video UI. - // If stop sharing screen, reset conference layout to the previous one - if (mainItem.conference && !mainItem.conference.core.isLocalScreenSharing && mainItem.lastConfLayoutBeforeSharing !== -1) { - mainItem.conferenceLayout = mainItem.lastConfLayoutBeforeSharing - mainItem.lastConfLayoutBeforeSharing = -1 - } - callLayout.sourceComponent = conference - ? conference.core.isScreenSharingEnabled || (mainItem.conferenceLayout == LinphoneEnums.ConferenceLayout.ActiveSpeaker && participantDeviceCount > 1) - ? activeSpeakerComponent - : participantDeviceCount <= 1 - ? waitingForOthersComponent - : gridComponent - : activeSpeakerComponent + Qt.callLater(function() { + callLayout.sourceComponent = undefined // unload old view before opening the new view to avoid conflicts in Video UI. + // If stop sharing screen, reset conference layout to the previous one + if (mainItem.conference && !mainItem.conference.core.isLocalScreenSharing && mainItem.lastConfLayoutBeforeSharing !== -1) { + mainItem.conferenceLayout = mainItem.lastConfLayoutBeforeSharing + mainItem.lastConfLayoutBeforeSharing = -1 + } + callLayout.sourceComponent = conference + ? conference.core.isScreenSharingEnabled || (mainItem.conferenceLayout == LinphoneEnums.ConferenceLayout.ActiveSpeaker && participantDeviceCount > 1) + ? activeSpeakerComponent + : participantDeviceCount <= 1 + ? waitingForOthersComponent + : gridComponent + : activeSpeakerComponent + }) } Text {