From bfa75330a447a2b9d4b8c29d2b18b3f7d8ef241d Mon Sep 17 00:00:00 2001 From: fourtf Date: Tue, 7 Aug 2018 06:25:58 +0200 Subject: [PATCH] fixed crash --- src/providers/twitch/TwitchAccount.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/providers/twitch/TwitchAccount.cpp b/src/providers/twitch/TwitchAccount.cpp index 8cde777d1..0f8b79a44 100644 --- a/src/providers/twitch/TwitchAccount.cpp +++ b/src/providers/twitch/TwitchAccount.cpp @@ -444,12 +444,13 @@ void TwitchAccount::parseEmotes(const rapidjson::Document &root) return; } - EmoteName code; - if (!rj::getSafe(emoteJSON, "code", code)) { + QString _code; + if (!rj::getSafe(emoteJSON, "code", _code)) { Log("No code key found in Emote value"); return; } + auto code = EmoteName{_code}; auto id = EmoteId{QString::number(idNumber)}; auto cleanCode = cleanUpCode(code);