1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-08-13 17:03:48 -04:00

Fix NullPointerException

Fixes issue 2261
This commit is contained in:
cketti 2010-09-03 01:17:05 +00:00
parent 6acb8e58af
commit e05ff59703

View File

@ -306,6 +306,13 @@ public class FolderList extends K9ListActivity
String accountUuid = intent.getStringExtra(EXTRA_ACCOUNT); String accountUuid = intent.getStringExtra(EXTRA_ACCOUNT);
mAccount = Preferences.getPreferences(this).getAccount(accountUuid); mAccount = Preferences.getPreferences(this).getAccount(accountUuid);
if (mAccount == null)
{
// This shouldn't normally happen. But apparently it does. See issue 2261.
finish();
return;
}
initialFolder = intent.getStringExtra(EXTRA_INITIAL_FOLDER); initialFolder = intent.getStringExtra(EXTRA_INITIAL_FOLDER);
boolean fromNotification = intent.getBooleanExtra(EXTRA_FROM_NOTIFICATION, false); boolean fromNotification = intent.getBooleanExtra(EXTRA_FROM_NOTIFICATION, false);
if (fromNotification && mAccount.goToUnreadMessageSearch()) if (fromNotification && mAccount.goToUnreadMessageSearch())