diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2022-10-10 02:48:58 +0300 |
---|---|---|
committer | Tim Krüger <t@timkrueger.me> | 2022-10-10 19:29:40 +0300 |
commit | 4f01cb855aa9bf15d40a10a8341ad4810a6a8916 (patch) | |
tree | e583b8c372cb23e309b6591dd0de97b45a933e92 /app/src | |
parent | 89607b8776b796613f3c2729030cb44ea91531d6 (diff) |
Fix crash when setting participant layout before receiving the data
When setting the participant layout, if the HPB is not used, the user ID
is got from the participant list data fetched when a new participant is
found. However, as the participant layout is setup as soon as a new
participant is found the data may have not been received yet, which
ended in a crash (NullPointerException). Now the access to the
participant object is guarded to prevent that.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/java/com/nextcloud/talk/activities/CallActivity.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java index 9085f6abe..0339b33cd 100644 --- a/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java +++ b/app/src/main/java/com/nextcloud/talk/activities/CallActivity.java @@ -2361,7 +2361,7 @@ public class CallActivity extends CallBaseActivity { String userId = ""; if (hasMCU) { userId = webSocketClient.getUserIdForSession(session); - } else if (participantMap.get(session).getCalculatedActorType() == Participant.ActorType.USERS) { + } else if (participantMap.get(session) != null && participantMap.get(session).getCalculatedActorType() == Participant.ActorType.USERS) { userId = participantMap.get(session).getCalculatedActorId(); } |