fixed crash

This commit is contained in:
fourtf 2018-08-07 06:25:58 +02:00
parent c26422aec1
commit bfa75330a4

View file

@ -444,12 +444,13 @@ void TwitchAccount::parseEmotes(const rapidjson::Document &root)
return; return;
} }
EmoteName code; QString _code;
if (!rj::getSafe(emoteJSON, "code", code)) { if (!rj::getSafe(emoteJSON, "code", _code)) {
Log("No code key found in Emote value"); Log("No code key found in Emote value");
return; return;
} }
auto code = EmoteName{_code};
auto id = EmoteId{QString::number(idNumber)}; auto id = EmoteId{QString::number(idNumber)};
auto cleanCode = cleanUpCode(code); auto cleanCode = cleanUpCode(code);