Fix odd NPE with list files for empty directories.

This commit is contained in:
LexManos 2017-08-08 23:27:34 -07:00
parent cdc8763fb0
commit c6d0c93a50

View file

@ -310,7 +310,7 @@ public class CoreModManager {
else
ret = ObjectArrays.concat(ret, dir.listFiles(filter), File.class);
}
return ret;
return ret == null ? new File[0] : ret;
}
private static File[] listFiles(FileFilter filter, File ... dirs)
{
@ -324,7 +324,7 @@ public class CoreModManager {
else
ret = ObjectArrays.concat(ret, dir.listFiles(filter), File.class);
}
return ret;
return ret == null ? new File[0] : ret;
}
private static void discoverCoreMods(File mcDir, LaunchClassLoader classLoader)