fix NullPtr Exception when there is no Sent Mail folder on the imap server

This commit is contained in:
Bernhard Redl 2011-04-23 08:24:13 +08:00 committed by Jesse Vincent
parent ad46c5a22e
commit f90fccbfa7

View file

@ -873,7 +873,7 @@ public class AccountSettings extends K9PreferenceActivity {
Iterator <? extends Folder > iter = folders.iterator();
while (iter.hasNext()) {
Folder folder = iter.next();
if (mAccount.getOutboxFolderName().equalsIgnoreCase(folder.getName())) {
if (mAccount.getOutboxFolderName() != null && mAccount.getOutboxFolderName().equalsIgnoreCase(folder.getName())) {
iter.remove();
}
}