* commit '1cd4294a97ca6d195a26a21d003cf2d791ebbcd0': Prevent NPE when getting a bad mailbox id.
This commit is contained in:
commit
7aaef75130
@ -583,13 +583,16 @@ public class NotificationController {
|
|||||||
|
|
||||||
if (folderCursor == null) {
|
if (folderCursor == null) {
|
||||||
LogUtils.e(LOG_TAG, "Null folder cursor for mMailboxId %d", mailboxId);
|
LogUtils.e(LOG_TAG, "Null folder cursor for mMailboxId %d", mailboxId);
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Folder folder = null;
|
Folder folder = null;
|
||||||
try {
|
try {
|
||||||
if (folderCursor.moveToFirst()) {
|
if (folderCursor.moveToFirst()) {
|
||||||
folder = new Folder(folderCursor);
|
folder = new Folder(folderCursor);
|
||||||
|
} else {
|
||||||
|
LogUtils.e(LOG_TAG, "Empty folder cursor for mMailboxId %d", mailboxId);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
folderCursor.close();
|
folderCursor.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user