fix: use irc-unknown when irc server couldn't be loaded (#5419)

This commit is contained in:
pajlada
2024-05-25 13:53:37 +02:00
committed by GitHub
parent 491b6db72f
commit c5802a0f49
2 changed files with 11 additions and 2 deletions
+10 -2
View File
@@ -92,8 +92,16 @@ void Channel::addMessage(MessagePtr message,
auto *irc = dynamic_cast<IrcChannel *>(this);
if (irc != nullptr)
{
channelPlatform = QString("irc-%1").arg(
irc->server()->userFriendlyIdentifier());
auto *ircServer = irc->server();
if (ircServer != nullptr)
{
channelPlatform = QString("irc-%1").arg(
irc->server()->userFriendlyIdentifier());
}
else
{
channelPlatform = "irc-unknown";
}
}
}
else if (this->isTwitchChannel())