From e468573551eb6f9a1931b8993d3af21411a8dc46 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 6 Sep 2022 11:39:21 +0200 Subject: [PATCH] Fixed crash when merging call into conference with active speaker layout --- .../voip/fragments/ConferenceCallFragment.kt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/linphone/activities/voip/fragments/ConferenceCallFragment.kt b/app/src/main/java/org/linphone/activities/voip/fragments/ConferenceCallFragment.kt index 6359edced..d0c19d1c3 100644 --- a/app/src/main/java/org/linphone/activities/voip/fragments/ConferenceCallFragment.kt +++ b/app/src/main/java/org/linphone/activities/voip/fragments/ConferenceCallFragment.kt @@ -95,7 +95,9 @@ class ConferenceCallFragment : GenericFragment(R.id.local_preview_video_surface) - conferenceViewModel.meParticipant.value?.setTextureView(preview) + if (preview != null) { + conferenceViewModel.meParticipant.value?.setTextureView(preview) + } } else { Log.i("[Conference Call] Either not in conference or current layout isn't active speaker, updating Core's native window id") coreContext.core.nativeVideoWindowId = null @@ -302,8 +304,13 @@ class ConferenceCallFragment : GenericFragment switchToActiveSpeakerLayoutWhenAlone() 2 -> switchToActiveSpeakerLayoutForTwoParticipants() else -> switchToActiveSpeakerLayoutForMoreThanTwoParticipants() @@ -462,6 +469,7 @@ class ConferenceCallFragment : GenericFragment