aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
index cd81da0b..592ed628 100644
--- a/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
+++ b/src/main/java/io/github/moulberry/notenoughupdates/NEUOverlay.java
@@ -1227,19 +1227,22 @@ public class NEUOverlay extends Gui {
this.searchedItems = searchedItems;
this.searchedItemsSubgroup = searchedItemsSubgroup;
- searchedItemsArr = null;
+ this.searchedItemsArr = null;
+
redrawItems = true;
});
}
/**
* Returns an index-able array containing the elements in searchedItems.
- * Whenever searchedItems is updated via the above method, the array is recreated here.
+ * Whenever searchedItems is updated in updateSearch(), the array is recreated here.
*/
public JsonObject[] getSearchedItems() {
- if(searchedItems==null) {
+ if(searchedItems == null) {
updateSearch();
+ return new JsonObject[0];
}
+
if(searchedItemsArr==null) {
searchedItemsArr = new JsonObject[searchedItems.size()];
int i=0;