aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-02 09:40:53 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-09-02 09:40:53 +0200
commit34b6ac6b6f956c04ba565b109aa826880eef0661 (patch)
tree735148d84ea40b3832b70bea70c92fdd571afce9 /src/main
parent889e7eb7a05d04875e26c4629b169f3478660212 (diff)
downloadskyhanni-34b6ac6b6f956c04ba565b109aa826880eef0661.tar.gz
skyhanni-34b6ac6b6f956c04ba565b109aa826880eef0661.tar.bz2
skyhanni-34b6ac6b6f956c04ba565b109aa826880eef0661.zip
Hopefully fixed a rare chat error
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt
index 4954d2caf..c7ddf1777 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt
@@ -156,8 +156,8 @@ object ChatManager {
val chatGUI = Minecraft.getMinecraft().ingameGUI.chatGUI
@Suppress("UNCHECKED_CAST")
- val chatLines = chatLinesField.invokeExact(chatGUI) as MutableList<ChatLine>
- if (!chatLines.removeIf { it.chatComponent === message }) return
+ val chatLines = chatLinesField.invokeExact(chatGUI) as MutableList<ChatLine?>? ?: return
+ if (!chatLines.removeIf { it?.chatComponent === message }) return
chatGUI.refreshChat()
val history = messageHistory[IdentityCharacteristics(message)] ?: return