Skip to content

Commit

Permalink
Fix the case where the bookmark key is the same key that is used to c…
Browse files Browse the repository at this point in the history
…lose a GUI. (#433)

* This should fix the case where the bookmark key is the same key that is used to close a GUI

* Spotless
  • Loading branch information
Cardinalstars authored Oct 30, 2023
1 parent 1647e87 commit bd5946f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/codechicken/nei/BookmarkContainerInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ public static boolean hasBookmarkContainerHandler(Class<? extends GuiContainer>
}

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() {
Expand Down

0 comments on commit bd5946f

Please sign in to comment.