diff --git a/src/com/fsck/k9/activity/FolderList.java b/src/com/fsck/k9/activity/FolderList.java index a7bdbd1d2..a28ff25d9 100644 --- a/src/com/fsck/k9/activity/FolderList.java +++ b/src/com/fsck/k9/activity/FolderList.java @@ -306,6 +306,13 @@ public class FolderList extends K9ListActivity String accountUuid = intent.getStringExtra(EXTRA_ACCOUNT); 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); boolean fromNotification = intent.getBooleanExtra(EXTRA_FROM_NOTIFICATION, false); if (fromNotification && mAccount.goToUnreadMessageSearch())