Fix #155 - Avoid a crash when replying and account is null

This commit is contained in:
Thomas 2022-06-09 17:23:55 +02:00
parent f51c24dfb2
commit 0d8c2f263f

View file

@ -189,6 +189,11 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
if (account == null) {
account = BaseMainActivity.accountWeakReference.get();
}
if (account == null) {
Toasty.error(ComposeActivity.this, getString(R.string.toast_error), Toasty.LENGTH_SHORT).show();
finish();
return;
}
if (instance == null) {
instance = account.instance;
}