Fix potential crash

This commit is contained in:
stom79 2018-09-11 18:02:31 +02:00
parent ee6ddcd21c
commit b4d3d6c80a
1 changed files with 4 additions and 1 deletions

View File

@ -480,7 +480,10 @@ public class ShowAccountActivity extends BaseActivity implements OnPostActionInt
@Override
public void onRetrieveAccount(final Account account, Error error) {
if( error != null || account.getAcct() == null){
Toast.makeText(getApplicationContext(), error.getError(),Toast.LENGTH_LONG).show();
if( error == null)
Toast.makeText(ShowAccountActivity.this, R.string.toast_error,Toast.LENGTH_LONG).show();
else
Toast.makeText(ShowAccountActivity.this, error.getError(),Toast.LENGTH_LONG).show();
return;
}
this.account = account;