From d46ab174172cb62e98431e8f7cc49763fab366d6 Mon Sep 17 00:00:00 2001 From: The Judge Date: Thu, 23 May 2024 08:12:28 -0700 Subject: [PATCH] Null-Check --- src/main/java/pojlib/InstanceHandler.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/pojlib/InstanceHandler.java b/src/main/java/pojlib/InstanceHandler.java index 85bc4834..d0926a9a 100644 --- a/src/main/java/pojlib/InstanceHandler.java +++ b/src/main/java/pojlib/InstanceHandler.java @@ -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 mods = Lists.newArrayList(instance.extProjects); mods.add(info); instance.extProjects = mods.toArray(mods.toArray(new ProjectInfo[0]));