From e05ff59703c03c75f8f01c079502dacfe4f58369 Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 3 Sep 2010 01:17:05 +0000 Subject: [PATCH] Fix NullPointerException Fixes issue 2261 --- src/com/fsck/k9/activity/FolderList.java | 7 +++++++ 1 file changed, 7 insertions(+) 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())