Fix NPE when downloading libs.
This commit is contained in:
		
							parent
							
								
									4059979e21
								
							
						
					
					
						commit
						6dbe4d7271
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		|  | @ -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 a new issue