fixed crash when moderation buttons are enabled

This commit is contained in:
fourtf
2018-08-12 00:01:37 +02:00
parent b3fd278c3c
commit 1ec1ecd52b
15 changed files with 89 additions and 68 deletions
+5 -2
View File
@@ -40,6 +40,9 @@ void TwitchServer::initialize(Settings &settings, Paths &paths)
{
getApp()->accounts->twitch.currentUserChanged.connect(
[this]() { postToThread([this] { this->connect(); }); });
this->bttv.loadEmotes();
this->ffz.loadEmotes();
}
void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead,
@@ -80,8 +83,8 @@ void TwitchServer::initializeConnection(IrcConnection *connection, bool isRead,
std::shared_ptr<Channel> TwitchServer::createChannel(const QString &channelName)
{
auto channel =
std::shared_ptr<TwitchChannel>(new TwitchChannel(channelName));
auto channel = std::shared_ptr<TwitchChannel>(
new TwitchChannel(channelName, this->bttv, this->ffz));
channel->refreshChannelEmotes();
channel->sendMessageSignal.connect(