Fixed NPE with fat Jar and clean working folder

java.lang.NullPointerException
	at the.bytecode.club.bootloader.Boot.populateLibsDirectory(Boot.java:327)
	at the.bytecode.club.bytecodeviewer.BytecodeViewer$3.run(BytecodeViewer.java:408)

This prevented at least Krakatau from working, because further
initialization in BytecodeViewer$3.run was inhibited.
This commit is contained in:
martoreto 2018-03-31 11:36:49 +02:00 committed by GitHub
parent 161ebaec54
commit 1a648c98b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -323,7 +323,7 @@ public class Boot {
}
public static void populateLibsDirectory() {
if (libsDir() != null)
if (libsDir() != null && libsDir().exists())
for (File f : libsDir().listFiles()) {
libsList.add(f.getName());
libsFileList.add(f.getAbsolutePath());
@ -482,4 +482,4 @@ public class Boot {
}
}
}
}
}