files may be null if the avatar folder does not exist
parent
856d5703c5
commit
d9a4df568c
|
@ -28,12 +28,14 @@ public class AvatarImages {
|
|||
|
||||
final File[] files=avatarPath.listFiles();
|
||||
names=new Vector<String>();
|
||||
for (final File file : files) {
|
||||
|
||||
if (file.isDirectory()) {
|
||||
names.add(file.getName());
|
||||
}
|
||||
}
|
||||
if (files != null) {
|
||||
for (final File file : files) {
|
||||
|
||||
if (file.isDirectory()) {
|
||||
names.add(file.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Vector<String> getNames() {
|
||||
|
@ -96,4 +98,4 @@ public class AvatarImages {
|
|||
|
||||
return INSTANCE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue