Skip to content

Commit

Permalink
fix: nullpointer
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy0000 committed May 29, 2024
1 parent 63b3f5e commit 1eab0fe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class ChatListener : Listener {
val channelData = ogChannelData.withChannelVerified()
val channelId = channelData.channelId
val channel = channelData.channel ?: return
val baseMessage = message().children().last()
val baseMessage = message().children().lastOrNull() ?: message()

if (viewers().isNotEmpty()) viewers().clear()
viewers() += channel.getAudience(player)
Expand Down

0 comments on commit 1eab0fe

Please sign in to comment.