Fix Exception on Android downloader.
This commit is contained in:
@@ -497,9 +497,12 @@ public class ImgDownloader {
|
||||
for (int l = 1; l < arrays.length - 1; l++) {
|
||||
if (arrays[l].equalsIgnoreCase("creature") && arrays[l + 1].toLowerCase().contains("token")) {
|
||||
nametoken = arrays[l - 1];
|
||||
if(l - 3 > 0)
|
||||
tokenstats = arrays[l - 3];
|
||||
if(nametoken.equalsIgnoreCase("artifact")){
|
||||
if(l - 2 > 0)
|
||||
nametoken = arrays[l - 2];
|
||||
if(l - 4 > 0)
|
||||
tokenstats = arrays[l - 4];
|
||||
}
|
||||
break;
|
||||
@@ -512,7 +515,7 @@ public class ImgDownloader {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (nametoken.isEmpty()) {
|
||||
if (nametoken.isEmpty() || tokenstats.isEmpty()) {
|
||||
tokenfound = false;
|
||||
nametoken = "Unknown";
|
||||
nametocheck = mappa.get(id);
|
||||
|
||||
Reference in New Issue
Block a user