Null check commits (#776)
This commit is contained in:
committed by
ThatGamerBlue
parent
d47c5a8c82
commit
c85b2b1ebb
@@ -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\":"))
|
||||
|
||||
Reference in New Issue
Block a user