From df02addf3404f07f245d6e6da8ce3ee8d72bd235 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Sat, 15 Oct 2022 12:48:00 +0000 Subject: Fix pv crash when in f7 (#366) Fix pv crash when your in f7??? --- .../notenoughupdates/profileviewer/GuiProfileViewer.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java index 094f3892..98f186cb 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/GuiProfileViewer.java @@ -767,9 +767,13 @@ public class GuiProfileViewer extends GuiScreen { if (mouseX > x && mouseX < x + 28) { if (mouseY > y && mouseY < y + 32) { - tooltipToDisplay = Collections.singletonList(iPage.stack + if (!iPage.stack .getTooltip(Minecraft.getMinecraft().thePlayer, false) - .get(0)); + .isEmpty()) { + tooltipToDisplay = Collections.singletonList(iPage.stack + .getTooltip(Minecraft.getMinecraft().thePlayer, false) + .get(0)); + } } } } -- cgit