Prevent possible NPE

Change-Id: I0254812c55cf6c5e4825aa28f900b8030502e9f6
This commit is contained in:
Marc Blank 2012-09-03 19:57:41 -07:00
parent 9e4556ae1c
commit 5a2b9579de

View File

@ -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(