mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-03 05:57:42 -05:00
Fix NPE when downloading libs.
This commit is contained in:
@@ -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("\"", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user