Fix crashes destroying conversation activity

pull/1615/head
fanchao 8 months ago
parent 4c52e66c0c
commit 09e46134e6

@ -852,9 +852,11 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
}
override fun onDestroy() {
viewModel.saveDraft(binding.inputBar.text.trim())
cancelVoiceMessage()
tearDownRecipientObserver()
if(::binding.isInitialized) {
viewModel.saveDraft(binding.inputBar.text.trim())
cancelVoiceMessage()
tearDownRecipientObserver()
}
super.onDestroy()
}
// endregion

Loading…
Cancel
Save