email: fix NPE

Fix possible NPE when protocol don't offers offerLookback (pop3)

Change-Id: Id924e06e691d0ed99179fcd37fd213ac379340fd
Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
This commit is contained in:
Jorge Ruesga 2015-06-03 20:01:16 +02:00 committed by Steve Kondik
parent e76717497d
commit 96a2b55e39

View File

@ -254,7 +254,7 @@ public class PopImapSyncAdapterService extends Service {
if (info.offerLookback) {
mailboxIds = getLoopBackMailboxIdsForSync(context, acct);
}
if (mailboxIds.length == 0) {
if (mailboxIds == null || mailboxIds.length == 0) {
final long inboxId = Mailbox.findMailboxOfType(context, acct.mId,
Mailbox.TYPE_INBOX);
if (inboxId != Mailbox.NO_MAILBOX) {