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
@@ -640,12 +640,11 @@ Outcome TwitchMessageBuilder::tryAppendEmote(const EmoteName &name)
auto flags = MessageElementFlags();
auto emote = boost::optional<EmotePtr>{};
if ((emote = getApp()->emotes->bttv.global(name))) {
if ((emote = this->twitchChannel->globalBttv().emote(name))) {
flags = MessageElementFlag::BttvEmote;
} else if (twitchChannel &&
(emote = this->twitchChannel->bttvEmote(name))) {
} else if ((emote = this->twitchChannel->bttvEmote(name))) {
flags = MessageElementFlag::BttvEmote;
} else if ((emote = getApp()->emotes->ffz.global(name))) {
} else if ((emote = this->twitchChannel->globalFfz().emote(name))) {
flags = MessageElementFlag::FfzEmote;
} else if (twitchChannel && (emote = this->twitchChannel->ffzEmote(name))) {
flags = MessageElementFlag::FfzEmote;