Fix / DB crash due to deserializaion

This commit is contained in:
Valere 2020-04-24 16:19:47 +02:00
parent 20e5ebc88b
commit 114bce5f64
1 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@
package im.vector.matrix.android.internal.crypto.store.db.model
import im.vector.matrix.android.api.extensions.tryThis
import im.vector.matrix.android.internal.crypto.model.OlmInboundGroupSessionWrapper
import im.vector.matrix.android.internal.crypto.store.db.deserializeFromRealm
import im.vector.matrix.android.internal.crypto.store.db.serializeForRealm
@ -36,7 +37,7 @@ internal open class OlmInboundGroupSessionEntity(
: RealmObject() {
fun getInboundGroupSession(): OlmInboundGroupSessionWrapper? {
return deserializeFromRealm(olmInboundGroupSessionData)
return tryThis { deserializeFromRealm<OlmInboundGroupSessionWrapper?>(olmInboundGroupSessionData) }
}
fun putInboundGroupSession(olmInboundGroupSessionWrapper: OlmInboundGroupSessionWrapper?) {