mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
[FIX] May be NPE
This commit is contained in:
parent
5ba36c3a1c
commit
7e77862cd4
1 changed files with 3 additions and 0 deletions
|
@ -103,6 +103,9 @@ public synchronized static List<JavaVersion> findJava() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static JavaVersion tryFindJavaByPath(Path path) {
|
private static JavaVersion tryFindJavaByPath(Path path) {
|
||||||
|
if(javaVersionsCache == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
for(JavaVersion version : javaVersionsCache) {
|
for(JavaVersion version : javaVersionsCache) {
|
||||||
if(version.jvmDir.equals(path)) {
|
if(version.jvmDir.equals(path)) {
|
||||||
return version;
|
return version;
|
||||||
|
|
Loading…
Reference in a new issue