Fix crash reported by Rageshake, stateKey can be null

This commit is contained in:
Benoit Marty 2019-10-24 18:51:47 +02:00
parent b766bce07d
commit 0040f8e924

View File

@ -73,6 +73,7 @@ internal class RoomMembers(private val realm: Realm,
return EventEntity
.where(realm, roomId, EventType.STATE_ROOM_MEMBER)
.sort(EventEntityFields.STATE_INDEX, Sort.DESCENDING)
.isNotNull(EventEntityFields.STATE_KEY)
.distinct(EventEntityFields.STATE_KEY)
.isNotNull(EventEntityFields.CONTENT)
}