am 1dd937bf: Prevent NPE when getting a bad mailbox id.

* commit '1dd937bf18fbd9c4967fbfdb5179508dd0a823fd':
  Prevent NPE when getting a bad mailbox id.
This commit is contained in:
Yu Ping Hu 2013-03-26 17:33:57 -07:00 committed by Android Git Automerger
commit 1cd4294a97

View File

@ -583,13 +583,16 @@ public class NotificationController {
if (folderCursor == null) {
LogUtils.e(LOG_TAG, "Null folder cursor for mMailboxId %d", mailboxId);
return;
continue;
}
Folder folder = null;
try {
if (folderCursor.moveToFirst()) {
folder = new Folder(folderCursor);
} else {
LogUtils.e(LOG_TAG, "Empty folder cursor for mMailboxId %d", mailboxId);
continue;
}
} finally {
folderCursor.close();