From 5a2b9579de8353996df7cbd84cf0847c2ee075d3 Mon Sep 17 00:00:00 2001 From: Marc Blank Date: Mon, 3 Sep 2012 19:57:41 -0700 Subject: [PATCH] Prevent possible NPE Change-Id: I0254812c55cf6c5e4825aa28f900b8030502e9f6 --- src/com/android/email/provider/EmailProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java index 7cc62141a..ed08ae8e8 100644 --- a/src/com/android/email/provider/EmailProvider.java +++ b/src/com/android/email/provider/EmailProvider.java @@ -3263,7 +3263,7 @@ outer: mMailboxId); // Clear the visible limit of the mailbox (if any) Mailbox mailbox = Mailbox.restoreMailboxWithId(mContext, mMailboxId); - if (mailbox.mVisibleLimit > 0) { + if (mailbox != null && mailbox.mVisibleLimit > 0) { ContentValues values = new ContentValues(); values.put(MailboxColumns.VISIBLE_LIMIT, 0); mContext.getContentResolver().update(