Fix error, that meta can be null
This commit is contained in:
parent
f05d4e33c3
commit
8da44daa99
|
@ -44,6 +44,8 @@ public class CurseforgeRepository implements IRepository {
|
|||
} catch (CurseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
System.out.println("WARNUNG: No file for Curseforge artifact " + artifact + " found!");
|
||||
}
|
||||
return meta;
|
||||
}
|
||||
|
|
|
@ -377,7 +377,9 @@ public class AddonscriptJSON extends ASBase {
|
|||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
Meta meta = new Meta();
|
||||
meta.name = link;
|
||||
return meta;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -385,7 +387,7 @@ public class AddonscriptJSON extends ASBase {
|
|||
public static class Relation {
|
||||
|
||||
public Meta getMeta(Indexes indexes) {
|
||||
if(indexes.ADDONS.values().contains(id))
|
||||
if(indexes.ADDONS.values().contains(id) && indexes.ADDONS.get(id).meta != null)
|
||||
return indexes.ADDONS.get(id).meta;
|
||||
else if(meta != null)
|
||||
return meta;
|
||||
|
|
Loading…
Reference in New Issue