davidliu

fix npe

@@ -336,7 +336,7 @@ constructor( @@ -336,7 +336,7 @@ constructor(
336 * Removes all participants and tracks from the room. 336 * Removes all participants and tracks from the room.
337 */ 337 */
338 private fun cleanupRoom() { 338 private fun cleanupRoom() {
339 - localParticipant.cleanup() 339 + _localParticipant?.cleanup()
340 remoteParticipants.keys.toMutableSet() // copy keys to avoid concurrent modifications. 340 remoteParticipants.keys.toMutableSet() // copy keys to avoid concurrent modifications.
341 .forEach { sid -> handleParticipantDisconnect(sid) } 341 .forEach { sid -> handleParticipantDisconnect(sid) }
342 } 342 }