Fixed NPEs caused by uninitialized lists in ModDirTransformerDiscoverer (#6277)
This commit is contained in:
parent
3484200f80
commit
29ad7a39de
1 changed files with 2 additions and 2 deletions
|
@ -54,12 +54,12 @@ public class ModDirTransformerDiscoverer implements ITransformerDiscoveryService
|
|||
|
||||
private static void scan(final Path gameDirectory) {
|
||||
final Path modsDir = gameDirectory.resolve(FMLPaths.MODSDIR.relative());
|
||||
transformers = new ArrayList<>();
|
||||
locators = new ArrayList<>();
|
||||
if (!Files.exists(modsDir)) {
|
||||
// Skip if the mods dir doesn't exist yet.
|
||||
return;
|
||||
}
|
||||
transformers = new ArrayList<>();
|
||||
locators = new ArrayList<>();
|
||||
try {
|
||||
Files.createDirectories(modsDir);
|
||||
Files.walk(modsDir, 1).forEach(ModDirTransformerDiscoverer::visitFile);
|
||||
|
|
Loading…
Reference in a new issue