From 0d80dd8fe1db197b5c39e4a4bd40c1b943eb0dc5 Mon Sep 17 00:00:00 2001 From: cketti Date: Thu, 18 Apr 2013 05:48:48 +0200 Subject: [PATCH] Avoid another NPE --- src/com/fsck/k9/fragment/MessageListFragment.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/fsck/k9/fragment/MessageListFragment.java b/src/com/fsck/k9/fragment/MessageListFragment.java index ea490dec8..60c57d20a 100644 --- a/src/com/fsck/k9/fragment/MessageListFragment.java +++ b/src/com/fsck/k9/fragment/MessageListFragment.java @@ -68,7 +68,6 @@ import com.actionbarsherlock.view.MenuItem; import com.actionbarsherlock.view.Window; import com.fsck.k9.Account; import com.fsck.k9.Account.SortType; -import com.fsck.k9.AccountStats; import com.fsck.k9.FontSizes; import com.fsck.k9.K9; import com.fsck.k9.Preferences; @@ -707,6 +706,10 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick } Cursor cursor = (Cursor) parent.getItemAtPosition(position); + if (cursor == null) { + return; + } + if (mSelectedCount > 0) { toggleMessageSelect(position); } else {