Switch the check, neater fix, thanks Zi.

meow-7.2.2
Beq 2024-06-10 19:01:09 +01:00
parent e36a47d568
commit f3fccdacea
1 changed files with 3 additions and 8 deletions

View File

@ -104,19 +104,14 @@ void LLEmojiHelper::showHelper(LLUICtrl* hostctrl_p, S32 local_x, S32 local_y, c
{
LLFloater* pHelperFloater = LLFloaterReg::getInstance(DEFAULT_EMOJI_HELPER_FLOATER);
// <FS:Beq> Try to prevent failed build of emoji picker from killing the viewer.
if(pHelperFloater)
{
// </FS:Beq>
mHelperHandle = pHelperFloater->getHandle();
mHelperCommitConn = pHelperFloater->setCommitCallback(std::bind([&](const LLSD& sdValue) { onCommitEmoji(utf8str_to_wstring(sdValue.asStringRef())[0]); }, std::placeholders::_2));
// <FS:Beq> Try to prevent failed build of emoji picker from killing the viewer.
}
else
if(!pHelperFloater)
{
LL_WARNS() << "Cannot show emoji helper, reason unknown." << LL_ENDL;
return;
}
// </FS:Beq>
mHelperHandle = pHelperFloater->getHandle();
mHelperCommitConn = pHelperFloater->setCommitCallback(std::bind([&](const LLSD& sdValue) { onCommitEmoji(utf8str_to_wstring(sdValue.asStringRef())[0]); }, std::placeholders::_2));
}
setHostCtrl(hostctrl_p);
mEmojiCommitCb = cb;