am d493ba25: Merge change Ie90b74aa into eclair

Merge commit 'd493ba257a1632a8de578e06a7df7ed311227887' into eclair-mr2

* commit 'd493ba257a1632a8de578e06a7df7ed311227887':
  Avoid NPE at onRefresh in MessageList
This commit is contained in:
satok 2009-10-05 19:39:06 -07:00 committed by Android Git Automerger
commit c5abc6d636

View File

@ -527,9 +527,11 @@ 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 // TODO: Should not be reading from DB in UI thread - need a cleaner way to get accountId
if (mMailboxId >= 0) { if (mMailboxId >= 0) {
Mailbox mailbox = Mailbox.restoreMailboxWithId(this, mMailboxId); Mailbox mailbox = Mailbox.restoreMailboxWithId(this, mMailboxId);
if (mailbox != null) {
mController.updateMailbox(mailbox.mAccountKey, mMailboxId, mControllerCallback); mController.updateMailbox(mailbox.mAccountKey, mMailboxId, mControllerCallback);
} }
} }
}
private void onFolders() { private void onFolders() {
if (mMailboxId >= 0) { if (mMailboxId >= 0) {