summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorAnsariel <ansariel.hiller@phoenixviewer.com>2023-04-22 14:19:42 +0200
committerGuru <alexandrgproductengine@lindenlab.com>2023-04-25 00:48:39 +0200
commit8fcf691623c21dedd0e478fb8d013a28a2959811 (patch)
tree1aeefdd00747b70f72c7349e0889f1410af0db9a /indra/llui
parentc2eec5b100a7064f3c737db46f893864a8b29c3a (diff)
Load correct localized version of emoji dictionary and guard against access violation exception
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llemojidictionary.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llui/llemojidictionary.cpp b/indra/llui/llemojidictionary.cpp
index d306407484..bb5c94689a 100644
--- a/indra/llui/llemojidictionary.cpp
+++ b/indra/llui/llemojidictionary.cpp
@@ -141,7 +141,13 @@ void LLEmojiDictionary::initClass()
LLSD data;
- const std::string filename = gDirUtilp->findSkinnedFilenames(LLDir::XUI, SKINNED_EMOJI_FILENAME, LLDir::CURRENT_SKIN).front();
+ auto filenames = gDirUtilp->findSkinnedFilenames(LLDir::XUI, SKINNED_EMOJI_FILENAME, LLDir::CURRENT_SKIN);
+ if (filenames.empty())
+ {
+ LL_WARNS() << "Emoji file characters not found" << LL_ENDL;
+ return;
+ }
+ const std::string filename = filenames.back();
llifstream file(filename.c_str());
if (file.is_open())
{