From 5647c6a80c603912fa649dbd04a1eb80e4156aad Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sat, 25 Aug 2018 10:23:58 +0000 Subject: [PATCH] Fix crash when receiving a whisper Fix #672 --- src/providers/twitch/TwitchMessageBuilder.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index b245c7664..389027004 100644 --- a/src/providers/twitch/TwitchMessageBuilder.cpp +++ b/src/providers/twitch/TwitchMessageBuilder.cpp @@ -625,6 +625,12 @@ void TwitchMessageBuilder::appendTwitchEmote( Outcome TwitchMessageBuilder::tryAppendEmote(const EmoteName &name) { + // Special channels, like /whispers and /channels return here + // This means they will not render any BTTV or FFZ emotes + if (this->twitchChannel == nullptr) { + return Failure; + } + auto flags = MessageElementFlags(); auto emote = boost::optional{};