Skip to content

Commit c50c14b

Browse files
committed
Add missing null check
1 parent c956e45 commit c50c14b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/net/theevilreaper/aves/file/gson/ItemStackGsonTypeAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public JsonElement serialize(@NotNull ItemStack itemStack, Type type, JsonSerial
4242

4343
if (itemStack.has(DataComponents.TOOLTIP_DISPLAY)) {
4444
TooltipDisplay tooltipDisplay = itemStack.get(DataComponents.TOOLTIP_DISPLAY);
45-
if (tooltipDisplay.hideTooltip()) {
45+
if (tooltipDisplay != null && tooltipDisplay.hideTooltip()) {
4646
metaObject.addProperty("hideTooltip", true);
4747
}
4848
}

0 commit comments

Comments
 (0)