aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-05-08 13:07:17 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-05-08 13:07:17 +0200
commit9cbb009f815923218b2b9ab7d246d0e904f63710 (patch)
tree5a80ed1e596831d8faae7fe1e37a1dc4419ae76e /src/main/java/cc
parent33cf31553ba9ea38510283443487dcdfaf88ff62 (diff)
downloadOneConfig-9cbb009f815923218b2b9ab7d246d0e904f63710.tar.gz
OneConfig-9cbb009f815923218b2b9ab7d246d0e904f63710.tar.bz2
OneConfig-9cbb009f815923218b2b9ab7d246d0e904f63710.zip
nasty nullpointers
Diffstat (limited to 'src/main/java/cc')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/pages/ModConfigPage.java2
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/pages/ModsPage.java2
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) {