Avoid NPE at onRefresh in MessageList

BUG: 2161449
This commit is contained in:
satok 2009-10-05 15:53:57 +09:00
parent 4f81086e34
commit e90b74aa04

View File

@ -527,7 +527,9 @@ public class MessageList extends ListActivity implements OnItemClickListener, On
// TODO: Should not be reading from DB in UI thread - need a cleaner way to get accountId
if (mMailboxId >= 0) {
Mailbox mailbox = Mailbox.restoreMailboxWithId(this, mMailboxId);
mController.updateMailbox(mailbox.mAccountKey, mMailboxId, mControllerCallback);
if (mailbox != null) {
mController.updateMailbox(mailbox.mAccountKey, mMailboxId, mControllerCallback);
}
}
}