diff options
author | isXander <isxander@users.noreply.github.com> | 2022-09-18 21:55:29 +0100 |
---|---|---|
committer | isXander <isxander@users.noreply.github.com> | 2022-09-18 21:55:29 +0100 |
commit | 405576acaa6e4a9887040a296f8988422351ea3e (patch) | |
tree | 341a9a2ccdb5f68d68ae353a0d75847e1e31954c /src/main/java/dev/isxander/yacl/gui | |
parent | 4626ecdf3b74aab2354af809632f3891f51aadcb (diff) | |
download | YetAnotherConfigLib-405576acaa6e4a9887040a296f8988422351ea3e.tar.gz YetAnotherConfigLib-405576acaa6e4a9887040a296f8988422351ea3e.tar.bz2 YetAnotherConfigLib-405576acaa6e4a9887040a296f8988422351ea3e.zip |
fix crash when using search
Diffstat (limited to 'src/main/java/dev/isxander/yacl/gui')
-rw-r--r-- | src/main/java/dev/isxander/yacl/gui/YACLScreen.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/dev/isxander/yacl/gui/YACLScreen.java b/src/main/java/dev/isxander/yacl/gui/YACLScreen.java index fc3984d..cef8fec 100644 --- a/src/main/java/dev/isxander/yacl/gui/YACLScreen.java +++ b/src/main/java/dev/isxander/yacl/gui/YACLScreen.java @@ -142,7 +142,7 @@ public class YACLScreen extends Screen { } public void changeCategory(int idx) { - if (currentCategoryIdx != -1 && config.categories().get(idx) instanceof PlaceholderCategory placeholderCategory) { + if (idx != -1 && config.categories().get(idx) instanceof PlaceholderCategory placeholderCategory) { client.setScreen(placeholderCategory.screen().apply(client, this)); } else { currentCategoryIdx = idx; |