diff options
author | Sadie Powell <sadie@witchery.services> | 2021-11-30 10:54:10 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2021-11-30 11:04:19 +0000 |
commit | 754c82d047b80c30ff2f775d32e8b9b054049ebd (patch) | |
tree | eb1abbc79af82320c34805c8282914609476a973 /src/channels.cpp | |
parent | 17fa704278a99aeac4e59df1bf58e63d88357788 (diff) |
Remove undefined behaviour around checking if this is null.
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index b2af559ae..77f23ea45 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -912,7 +912,7 @@ bool Channel::CheckKick(User *user) return false; if (mask.empty()) - mask = this->ci->GetIdealBan(user); + mask = this->ci ? this->ci->GetIdealBan(user) : "*!*@" + user->GetDisplayedHost(); if (reason.empty()) reason = Language::Translate(user->Account(), CHAN_NOT_ALLOWED_TO_JOIN); |