From 3075fb0e8438a9ab701ddbef0eba75064b475f6f Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Mon, 7 Nov 2022 20:11:03 +0000 Subject: add null check instead of spamming logs every frame (#430) --- .../github/moulberry/notenoughupdates/profileviewer/BasicPage.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java/io') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java index e5c17a1a..97db29cf 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/profileviewer/BasicPage.java @@ -275,7 +275,8 @@ public class BasicPage extends GuiProfileViewerPage { true, 0 ); - try { + if (NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo("BOOSTER_COOKIE") != null && + NotEnoughUpdates.INSTANCE.manager.auctionManager.getBazaarInfo("BOOSTER_COOKIE").has("avg_buy")) { double networthInCookies = ( networth / @@ -334,8 +335,6 @@ public class BasicPage extends GuiProfileViewerPage { } } } - } catch (Exception ignored) { - ignored.printStackTrace(); } } else { //Networth is under 0 -- cgit