Fix crashes destroying conversation activity

This commit is contained in:
fanchao 2024-08-13 14:29:22 +10:00
parent 4c52e66c0c
commit 09e46134e6

View File

@ -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