mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-30 05:02:26 -05:00
fix potential NPE
This commit is contained in:
parent
e01b1b189f
commit
2d45e53739
@ -1183,10 +1183,8 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
|
||||
if (menuInfo != null) {
|
||||
mSelectedContextAccount = (BaseAccount)getListView().getItemAtPosition(menuInfo.position);
|
||||
}
|
||||
Account realAccount = null;
|
||||
if (mSelectedContextAccount instanceof Account) {
|
||||
realAccount = (Account)mSelectedContextAccount;
|
||||
}
|
||||
Account realAccount = (Account)mSelectedContextAccount;
|
||||
switch (item.getItemId()) {
|
||||
case R.id.delete_account:
|
||||
onDeleteAccount(realAccount);
|
||||
@ -1219,6 +1217,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
|
||||
onMove(realAccount, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user