From 85938d4d380c15860149e38cdbfdb24bc9c698e5 Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Sun, 21 Jul 2024 20:10:58 +0700 Subject: [PATCH] [FIX] Backport: OptionalView fixDependencies --- .../pro/gravit/launcher/profiles/optional/OptionalView.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java index 25fdb266..9b482396 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/optional/OptionalView.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/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); } }