From bd5946f5bf2d53b7e98a945424c6ff554a30ecbe Mon Sep 17 00:00:00 2001 From: Ryan Nasers <42074409+Cardinalstars@users.noreply.github.com> Date: Mon, 30 Oct 2023 02:17:53 -0500 Subject: [PATCH] Fix the case where the bookmark key is the same key that is used to close a GUI. (#433) * This should fix the case where the bookmark key is the same key that is used to close a GUI * Spotless --- src/main/java/codechicken/nei/BookmarkContainerInfo.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/codechicken/nei/BookmarkContainerInfo.java b/src/main/java/codechicken/nei/BookmarkContainerInfo.java index 7b7a82ef..6b35703b 100644 --- a/src/main/java/codechicken/nei/BookmarkContainerInfo.java +++ b/src/main/java/codechicken/nei/BookmarkContainerInfo.java @@ -22,7 +22,10 @@ public class BookmarkContainerInfo { } public static IBookmarkContainerHandler getBookmarkContainerHandler(GuiContainer gui) { - return handlerMap.get(gui.getClass()); + if (gui != null) { + return handlerMap.get(gui.getClass()); + } + return null; } public static void load() {