From ec526a343d5cb507cd9322f36f3b2771958553ea Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Mon, 8 Jul 2024 21:29:40 +0700 Subject: [PATCH] [FIX] OptionalView.fixDependencies throw out of range --- .../gravit/launcher/base/profiles/optional/OptionalView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalView.java b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalView.java index 80df3666..7837a127 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalView.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/base/profiles/optional/OptionalView.java @@ -88,7 +88,7 @@ public Set getEnabledActions() { public void fixDependencies() { Set disabled = all.stream().filter(t -> !isEnabled(t)).collect(Collectors.toSet()); for (OptionalFile file : disabled) { - if (file.group != null && Arrays.stream(file.group).noneMatch(this::isEnabled)) { + if (file.group != null && file.group.length > 0 && Arrays.stream(file.group).noneMatch(this::isEnabled)) { enable(file.group[0], false, null); } }