From 66f85ccbde439cb2216f30a0f6ef564e61e0c3c2 Mon Sep 17 00:00:00 2001 From: Netami1 Date: Sat, 24 Aug 2019 18:06:57 -0400 Subject: [PATCH] add proper config check, expand guard case (#1434) --- .../client/plugins/coxhelper/CoxInfoBox.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/CoxInfoBox.java b/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/CoxInfoBox.java index 0bd2809891..b941aee5e1 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/CoxInfoBox.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/coxhelper/CoxInfoBox.java @@ -75,14 +75,19 @@ public class CoxInfoBox extends Overlay { prayAgainstPanel.getChildren().clear(); - final PrayAgainst prayAgainst = plugin.getPrayAgainstOlm(); - - if (plugin.getPrayAgainstOlm() == null && !plugin.isConfigPrayAgainstOlm()) + if (!plugin.isConfigPrayAgainstOlm()) { return null; } - if (System.currentTimeMillis() < (plugin.getLastPrayTime() + 120000) && plugin.getPrayAgainstOlm() != null) + final PrayAgainst prayAgainst = plugin.getPrayAgainstOlm(); + + if (prayAgainst == null) + { + return null; + } + + if (System.currentTimeMillis() < plugin.getLastPrayTime() + 120000) { final int scale = plugin.getPrayAgainstSize(); InfoBoxComponent prayComponent = new InfoBoxComponent();