Fix #143 - Avoid a crash in conversation activity

This commit is contained in:
Thomas 2022-06-08 09:17:27 +02:00
parent 9c430e4a22
commit b96996ddde
1 changed files with 3 additions and 1 deletions

View File

@ -78,7 +78,9 @@ public class ContextActivity extends BaseActivity {
finish(); finish();
return; return;
} }
MastodonHelper.loadPPMastodon(binding.profilePicture, BaseMainActivity.accountWeakReference.get().mastodon_account); if (BaseMainActivity.accountWeakReference.get() != null) {
MastodonHelper.loadPPMastodon(binding.profilePicture, BaseMainActivity.accountWeakReference.get().mastodon_account);
}
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
new Thread(() -> { new Thread(() -> {
focusedStatus = SpannableHelper.convertStatus(getApplication().getApplicationContext(), focusedStatus); focusedStatus = SpannableHelper.convertStatus(getApplication().getApplicationContext(), focusedStatus);