mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-27 08:55:54 +03:00
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>
This commit is contained in:
parent
89607b8776
commit
4f01cb855a
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue