diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index a796cdc99..b78051a5e 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -4228,8 +4228,9 @@ void LLTextEditor::appendTextImpl(const std::string &new_text, const LLStyleSP s if (always_underline) link_style->mUnderline = true; appendAndHighlightText(link, part, link_style, !always_underline/*match.underlineOnHoverOnly()*/); }; - const auto&& cb = force_replace_links ? static_cast(boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3)) : LLUrlRegistryNullCallback; - while (!text.empty() && LLUrlRegistry::instance().findUrl(text, match, cb)) + const auto&& cb = boost::bind(&LLTextEditor::replaceUrl, this, _1, _2, _3); + auto& urlr = LLUrlRegistry::instance(); + while (!text.empty() && (force_replace_links ? urlr.findUrl(text, match, cb) : urlr.findUrl(text, match))) { start = match.getStart(); end = match.getEnd()+1;