From e176ed76f756be322d1f866375e054f0cd438885 Mon Sep 17 00:00:00 2001 From: DoKM Date: Sun, 22 Aug 2021 12:13:12 +0200 Subject: fix storage overlay nullpointer crash --- .../io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java index 91ac5e6f..6b459ecb 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java @@ -594,14 +594,14 @@ public class StorageOverlay extends GuiElement { if(coords.y-11 > 3+storageViewSize || coords.y+90 < 3) continue; StorageManager.StoragePage page = StorageManager.getInstance().getPage(storageId, false); - + if(editingNameId == storageId) { int len = fontRendererObj.getStringWidth(renameStorageField.getTextDisplay())+10; renameStorageField.setSize(len, 12); renameStorageField.render(storageX, storageY-13); } else { String pageTitle; - if(page.customTitle != null && !page.customTitle.isEmpty()) { + if(page != null && page.customTitle != null && !page.customTitle.isEmpty()) { pageTitle = Utils.chromaStringByColourCode(page.customTitle); } else if(entry.getValue() < 9) { pageTitle = "Ender Chest Page " + (entry.getValue() + 1); -- cgit