Fix Crashes 1 and 5: LLTextEditor::replaceUrl, call to member
When a boost bind is converted into a suitable slot_function_type, trackables will no longer be tracked, thus using ternary or static casts breaks tracking, so old text editors were still receiving signals.
This commit is contained in:
@@ -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<LLUrlLabelCallback>(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;
|
||||
|
||||
Reference in New Issue
Block a user