diff --git a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/impl.kt b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/impl.kt index f10fc86ff..694425eba 100644 --- a/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/impl.kt +++ b/mirai-core/src/commonMain/kotlin/net.mamoe.mirai/message/data/impl.kt @@ -178,7 +178,9 @@ internal fun Message.followedByImpl(tail: Message): MessageChain { } else if (!tailUsed) { tailUsed = true iterator = tail.iterator() - iterator.next() + if (iterator.hasNext()) { + iterator.next() + } else null } else null } )