Skip to content

Commit

Permalink
Null-Check
Browse files Browse the repository at this point in the history
  • Loading branch information
The Judge committed May 23, 2024
1 parent d5864b9 commit d46ab17
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/pojlib/InstanceHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,10 @@ public static void addExtraProject(MinecraftInstances instances, MinecraftInstan
info.version = version;
info.type = type;

if(instance.extProjects == null) {
instance.extProjects = new ProjectInfo[0];
}

ArrayList<ProjectInfo> mods = Lists.newArrayList(instance.extProjects);
mods.add(info);
instance.extProjects = mods.toArray(mods.toArray(new ProjectInfo[0]));
Expand Down

0 comments on commit d46ab17

Please sign in to comment.