Fix NPE when downloading libs.

dev/0.11
modmuss50 2017-04-05 13:23:06 +01:00
parent 4059979e21
commit 6dbe4d7271
No known key found for this signature in database
GPG Key ID: 773D17BE8BF49C82
1 changed files with 5 additions and 1 deletions

View File

@ -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("\"", "");
}
}