From 87d8ab4bb42c67a7a273c1ae76d94bf60cb3132a Mon Sep 17 00:00:00 2001 From: Ben Komalo Date: Thu, 21 Jul 2011 13:01:31 -0700 Subject: [PATCH] Prevent touching closed cursor Bug: 4595568 Change-Id: Ic3087dc5f194aa879a3fea9d45fe77a1e285bde0 --- src/com/android/email/activity/MailboxFragmentAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/email/activity/MailboxFragmentAdapter.java b/src/com/android/email/activity/MailboxFragmentAdapter.java index 2d7d0ca4c..f486a8841 100644 --- a/src/com/android/email/activity/MailboxFragmentAdapter.java +++ b/src/com/android/email/activity/MailboxFragmentAdapter.java @@ -210,7 +210,7 @@ class MailboxFragmentAdapter extends CursorAdapter { private boolean isHeader(int position) { Cursor c = getCursor(); - if (c == null) { + if ((c == null) || c.isClosed()) { return false; } c.moveToPosition(position);