diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/ChatManager.kt | 4 |
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 |