From b44bed2596a25b716f2f2089d18ba64543193460 Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 3 Sep 2010 01:16:41 +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 ea2e447bd..6efe5992a 100644 --- a/src/com/fsck/k9/activity/FolderList.java +++ b/src/com/fsck/k9/activity/FolderList.java @@ -310,6 +310,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())