mirror of
https://github.com/GTNewHorizons/NotEnoughEnergistics.git
synced 2026-11-17 10:55:07 +00:00
Add an extra sanity check to recipe index manipulation to prevent crashes (#12)
This commit is contained in:
1 parent
8d26167423
commit
83fbd443da
3 files changed
+117
-90
No files matched your search
@@ -195,7 +195,7 @@ public class NEEContainerDrawHandler {
|
||||
recipeIndex = gui.page * handler.recipiesPerPage() + i;
|
||||
}
|
||||
|
||||
if (recipeIndex >= 0 && handler != null) {
|
||||
if (recipeIndex >= 0 && handler != null && recipeIndex < handler.numRecipes()) {
|
||||
IngredientTracker tracker = this.isCraftingTerm ? new IngredientTracker(gui.firstGui, handler, recipeIndex) : new IngredientTracker(gui, handler, recipeIndex);
|
||||
trackerMap.put(overlayButton.id, tracker);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user