Bullet-proof an NPE I ran into on a 2.2 test emulator while on an airplane

This commit is contained in:
Jesse Vincent 2012-09-12 18:54:06 -04:00
parent 2a05bc0caa
commit 593569f4ad

View file

@ -1990,7 +1990,7 @@ public class MessageList extends K9ListActivity implements OnItemClickListener {
Folder folder;
for (MessageInfoHolder holder : mMessages) {
uid = message.getUid();
if (holder.uid == uid || uid.equals(holder.uid)) {
if (uid != null && (holder.uid == uid || uid.equals(holder.uid))) {
folder = message.getFolder();
if (holder.folder.name.equals(folder.getName()) &&
holder.account.equals(folder.getAccount().getUuid())) {