9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-31 12:56:35 +00:00

handle null pointer

This commit is contained in:
Julian Krings
2024-06-25 13:33:44 +02:00
parent 6c3f3dc889
commit 48f901fc8c

View File

@@ -362,7 +362,12 @@ public class ResourceLoader<T extends IrisRegistrant> implements MeteredCache {
if (folderCache.get() == null) {
KList<File> fc = new KList<>();
for (File i : root.listFiles()) {
File[] files = root.listFiles();
if (files == null) {
throw new IllegalStateException("Failed to list files in " + root);
}
for (File i : files) {
if (i.isDirectory()) {
if (i.getName().equals(folderName)) {
fc.add(i);