Fix NPE when downloading libs.
parent
4059979e21
commit
6dbe4d7271
|
@ -83,7 +83,11 @@ public class Version {
|
|||
if (natives == null) {
|
||||
return "";
|
||||
} else {
|
||||
return "-" + natives.get(OperatingSystem.getOS().replace("${arch}", OperatingSystem.getArch())).getAsString().replace("\"", "");
|
||||
JsonElement element = natives.get(OperatingSystem.getOS().replace("${arch}", OperatingSystem.getArch()));
|
||||
if(element == null){
|
||||
return "";
|
||||
}
|
||||
return "-" + element.getAsString().replace("\"", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue