AI 145083: ADT #1777728: fix NPE when AVD list is empty
BUG=1777728 Automated import of CL 145083
This commit is contained in:
committed by
The Android Open Source Project
parent
28ac69a6e6
commit
931838e07e
@@ -742,11 +742,12 @@ public final class AvdManager {
|
||||
private void buildAvdList(ArrayList<AvdInfo> list) throws AndroidLocationException {
|
||||
|
||||
File[] avds = buildAvdFilesList();
|
||||
|
||||
for (File avd : avds) {
|
||||
AvdInfo info = parseAvdInfo(avd, false /*acceptError*/);
|
||||
if (info != null) {
|
||||
list.add(info);
|
||||
if (avds != null) {
|
||||
for (File avd : avds) {
|
||||
AvdInfo info = parseAvdInfo(avd, false /*acceptError*/);
|
||||
if (info != null) {
|
||||
list.add(info);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user