openvidu-server: fix NullPointer when location is null in Participant

pull/649/head
pabloFuente 2021-08-10 21:34:27 +02:00
parent 23eed95937
commit b9fa01eccb
1 changed files with 2 additions and 2 deletions

View File

@ -314,8 +314,8 @@ public class Participant {
json.addProperty("sessionId", this.sessionId);
json.addProperty("createdAt", this.token.getCreatedAt());
json.addProperty("activeAt", this.activeAt);
json.addProperty("location", this.location.toString());
json.addProperty("ip", this.location.getIp());
json.addProperty("location", this.location != null ? this.location.toString() : "unknown");
json.addProperty("ip", this.location != null ? this.location.getIp() : null);
json.addProperty("platform", this.platform);
if (this.token.getToken() != null) {
json.addProperty("token", this.token.getToken());