SAS: fix potential crash

This commit is contained in:
ganfra 2019-10-04 19:36:22 +02:00
parent 4e4fb4c565
commit 9c5987b682

View file

@ -97,8 +97,9 @@ class SASVerificationActivity : SimpleFragmentActivity() {
}
if (isIncoming) {
val incoming = viewModel.transaction as IncomingSasVerificationTransaction
when (incoming.uxState) {
val incoming = viewModel.transaction as? IncomingSasVerificationTransaction
when (incoming?.uxState) {
null,
IncomingSasVerificationTransaction.UxState.UNKNOWN,
IncomingSasVerificationTransaction.UxState.SHOW_ACCEPT,
IncomingSasVerificationTransaction.UxState.WAIT_FOR_KEY_AGREEMENT -> {