mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
make skin variation parsing more resilient
This commit is contained in:
parent
714d3178d6
commit
712b1c4f12
|
@ -127,8 +127,14 @@ void Emojis::loadEmojis()
|
||||||
|
|
||||||
auto variationEmojiData = std::make_shared<EmojiData>();
|
auto variationEmojiData = std::make_shared<EmojiData>();
|
||||||
|
|
||||||
|
auto toneNameIt = toneNames.find(tone);
|
||||||
|
if (toneNameIt == toneNames.end()) {
|
||||||
|
debug::Log("Tone with key {} does not exist in tone names map", tone);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
parseEmoji(variationEmojiData, variation,
|
parseEmoji(variationEmojiData, variation,
|
||||||
emojiData->shortCode + "_" + toneNames[tone]);
|
emojiData->shortCode + "_" + toneNameIt->second);
|
||||||
|
|
||||||
this->emojiShortCodeToEmoji.insert(variationEmojiData->shortCode,
|
this->emojiShortCodeToEmoji.insert(variationEmojiData->shortCode,
|
||||||
variationEmojiData);
|
variationEmojiData);
|
||||||
|
|
Loading…
Reference in a new issue