diff options
author | DoKM <mcazzyman@gmail.com> | 2021-08-22 12:13:12 +0200 |
---|---|---|
committer | DoKM <mcazzyman@gmail.com> | 2021-08-22 12:13:12 +0200 |
commit | e176ed76f756be322d1f866375e054f0cd438885 (patch) | |
tree | ec2fc651913dbe21262cb78f9f922365cef02e13 | |
parent | 6d886c664d34a30e67e450e9af6c88f9466376e8 (diff) | |
download | NotEnoughUpdates-e176ed76f756be322d1f866375e054f0cd438885.tar.gz NotEnoughUpdates-e176ed76f756be322d1f866375e054f0cd438885.tar.bz2 NotEnoughUpdates-e176ed76f756be322d1f866375e054f0cd438885.zip |
fix storage overlay nullpointer crash
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscgui/StorageOverlay.java | 4 |
1 files changed, 2 insertions, 2 deletions
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); |