diff options
author | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-05-08 13:07:17 +0200 |
---|---|---|
committer | DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> | 2022-05-08 13:07:17 +0200 |
commit | 9cbb009f815923218b2b9ab7d246d0e904f63710 (patch) | |
tree | 5a80ed1e596831d8faae7fe1e37a1dc4419ae76e /src/main/java | |
parent | 33cf31553ba9ea38510283443487dcdfaf88ff62 (diff) | |
download | OneConfig-9cbb009f815923218b2b9ab7d246d0e904f63710.tar.gz OneConfig-9cbb009f815923218b2b9ab7d246d0e904f63710.tar.bz2 OneConfig-9cbb009f815923218b2b9ab7d246d0e904f63710.zip |
nasty nullpointers
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java | 2 | ||||
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java index b98c139..790d0e4 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java @@ -39,7 +39,7 @@ public class ModConfigPage extends Page { @Override public void draw(long vg, int x, int y) { if (page.categories.size() == 0) return; - String filter = OneConfigGui.INSTANCE.getSearchValue().toLowerCase().trim(); + String filter = OneConfigGui.INSTANCE == null ? "" : OneConfigGui.INSTANCE.getSearchValue().toLowerCase().trim(); LinkedHashMap<String, ArrayList<BasicOption>> filteredSubcategories = new LinkedHashMap<>(page.categories.get(selectedCategory).subcategories); if (!filter.equals("")) { filteredSubcategories.clear(); diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java index 9b50d19..3cb00ec 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java @@ -41,7 +41,7 @@ public class ModsPage extends Page { } public void draw(long vg, int x, int y) { - String filter = OneConfigGui.INSTANCE.getSearchValue().toLowerCase().trim(); + String filter = OneConfigGui.INSTANCE == null ? "" : OneConfigGui.INSTANCE.getSearchValue().toLowerCase().trim(); int iX = x + 16; int iY = y + 72; for (ModCard modCard : modCards) { |