v1.2.0: fixed a crash caused by non null items with null names
This commit is contained in:
parent
7005459acf
commit
51ac563199
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user