From 0cec0039caf9df6df2250a08bf540a3bf00eed9b Mon Sep 17 00:00:00 2001 From: BossHuso Date: Thu, 18 Feb 2021 14:54:14 -0800 Subject: [PATCH] chatcommands: Fix adventure log widget NPE --- .../plugins/chatcommands/ChatCommandsPlugin.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java index 8c06945a66..7d877cb7aa 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java @@ -481,10 +481,14 @@ public class ChatCommandsPlugin extends Plugin advLogLoaded = false; Widget adventureLog = client.getWidget(WidgetInfo.ADVENTURE_LOG); - Matcher advLogExploitsText = ADVENTURE_LOG_TITLE_PATTERN.matcher(adventureLog.getChild(ADV_LOG_EXPLOITS_TEXT_INDEX).getText()); - if (advLogExploitsText.find()) + + if (adventureLog != null) { - pohOwner = advLogExploitsText.group(1); + Matcher advLogExploitsText = ADVENTURE_LOG_TITLE_PATTERN.matcher(adventureLog.getChild(ADV_LOG_EXPLOITS_TEXT_INDEX).getText()); + if (advLogExploitsText.find()) + { + pohOwner = advLogExploitsText.group(1); + } } }