Fix potential crash when SinguReplaceLinks is off.
This commit is contained in:
@@ -4228,7 +4228,7 @@ void LLTextEditor::appendTextImpl(const std::string &new_text, const LLStyleSP s
|
|||||||
if (always_underline) link_style->mUnderline = true;
|
if (always_underline) link_style->mUnderline = true;
|
||||||
appendAndHighlightText(link, part, link_style, !always_underline/*match.underlineOnHoverOnly()*/);
|
appendAndHighlightText(link, part, link_style, !always_underline/*match.underlineOnHoverOnly()*/);
|
||||||
};
|
};
|
||||||
const auto&& cb = force_replace_links ? boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3) : LLUrlLabelCallback();
|
const auto&& cb = force_replace_links ? static_cast<LLUrlLabelCallback>(boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3)) : LLUrlRegistryNullCallback;
|
||||||
while (!text.empty() && LLUrlRegistry::instance().findUrl(text, match, cb))
|
while (!text.empty() && LLUrlRegistry::instance().findUrl(text, match, cb))
|
||||||
{
|
{
|
||||||
start = match.getStart();
|
start = match.getStart();
|
||||||
|
|||||||
Reference in New Issue
Block a user