fix(Scout): fix possible crash

This commit is contained in:
Cilly Leang 2025-10-17 02:25:21 +11:00 committed by GitHub
parent d943e41fd3
commit 5ced2c7924
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -674,7 +674,9 @@ class Scout : Plugin() {
"compare",
Object::class.java, // ?? :sob:
Object::class.java,
) { (param, ch1: Channel, ch2: Channel) ->
) { (param, ch1: Channel?, ch2: Channel?) ->
if (ch1 == null || ch2 == null) return@before
// ChannelUtils.H <=> ChannelUtils.isThread
if (ChannelUtils.H(ch1) && !ChannelUtils.H(ch2)) {
param.result = 1