Fix crash when receiving whisper (#2298)
PR #2284 introduced this bug: whispers aren't linked to a twitch channel but we're storing user colors in a twitch channel. So, dereferencing a nullptr. Not good.
This commit is contained in:
@@ -600,7 +600,10 @@ void TwitchMessageBuilder::parseUsername()
|
||||
// }
|
||||
|
||||
this->message().loginName = this->userName;
|
||||
this->twitchChannel->setUserColor(this->userName, this->usernameColor_);
|
||||
if (this->twitchChannel != nullptr)
|
||||
{
|
||||
this->twitchChannel->setUserColor(this->userName, this->usernameColor_);
|
||||
}
|
||||
|
||||
// Update current user color if this is our message
|
||||
auto currentUser = getApp()->accounts->twitch.getCurrent();
|
||||
|
||||
Reference in New Issue
Block a user