Fix NPE in getHierarchicalFolder
Fixes exceptions like this: java.lang.NullPointerException: Attempt to read from field 'java.lang.String com.android.mail.providers.Folder.name' on a null object reference at com.android.email.activity.setup.MailboxSettings$MailboxSettingsFolderLoaderCallbacks.getHierarchicalFolder(MailboxSettings.java:377) Change-Id: I2c5dda84439caa5d894f5706c9c6a07079cda69c
This commit is contained in:
parent
c60b08e059
commit
7725334f81
@ -374,7 +374,9 @@ public class MailboxSettings extends PreferenceActivity {
|
||||
Folder tmp = folder;
|
||||
while (tmp != null && tmp.parent != null && !tmp.parent.toString().isEmpty()) {
|
||||
tmp = folders.get(tmp.parent);
|
||||
name = tmp.name + "/" + name;
|
||||
if (tmp != null) {
|
||||
name = tmp.name + "/" + name;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user