From ed54455511a66ea7ca1fabe135c21b341f4e3775 Mon Sep 17 00:00:00 2001 From: isXander Date: Sun, 15 Dec 2024 01:44:57 +0000 Subject: [PATCH] Fix AOOB in xander's sodium options --- .../compatibility/yacl/screenop/YACLScreenProcessor.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/dev/isxander/controlify/compatibility/yacl/screenop/YACLScreenProcessor.java b/src/main/java/dev/isxander/controlify/compatibility/yacl/screenop/YACLScreenProcessor.java index 2329839c..779e7f3f 100644 --- a/src/main/java/dev/isxander/controlify/compatibility/yacl/screenop/YACLScreenProcessor.java +++ b/src/main/java/dev/isxander/controlify/compatibility/yacl/screenop/YACLScreenProcessor.java @@ -34,6 +34,9 @@ protected void onTabChanged(ControllerEntity controller) { screen.setFocused(optionListHolder); + if (optionList.children().isEmpty()) + return; + for (OptionListWidget.Entry entry : optionList.children()) { entry.setFocused(false); entry.setFocused(null);