From 51ac5631997d5f56193bf079698a0d39512dd654 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 9 Feb 2022 13:20:50 -0500 Subject: [PATCH] v1.2.0: fixed a crash caused by non null items with null names --- .../shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java index 57f51777a..4733c2dce 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ItemSlot.java @@ -276,7 +276,10 @@ public class ItemSlot extends Button { @Override protected String hoverText() { - if (item != null) return Messages.titleCase(item.name()); - else return super.hoverText(); + if (item != null && item.name() != null) { + return Messages.titleCase(item.name()); + } else { + return super.hoverText(); + } } }