Null check commits (#776)

This commit is contained in:
sdburns1998
2019-06-27 22:26:27 +02:00
committed by ThatGamerBlue
parent d47c5a8c82
commit c85b2b1ebb

View File

@@ -268,7 +268,15 @@ public class RuneLiteAPI
{
try
{
String jsonData = new String(downloadUrl(new URL(GITHUB_API)));
byte[] commits = downloadUrl(new URL(GITHUB_API));
if (commits == null)
{
return null;
}
String jsonData = new String(commits);
for (String s : jsonData.split("\n"))
{
if (s.startsWith("\"sha\":"))