Fix Crash on text editor right click

Fixes Crashes N  and P
Missing nullcheck, my bad
Never expected there not to be a menu segment url when a menu is open
This commit is contained in:
Liru Færs
2020-01-08 10:05:14 -05:00
parent c1f39e167c
commit 31003f13af

View File

@@ -375,7 +375,7 @@ LLTextEditor::~LLTextEditor()
const std::string& LLTextEditor::getMenuSegmentUrl() const
{
auto segment = getSegmentAtLocalPos(mLastContextMenuX, mLastContextMenuY);
auto style = segment->getStyle();
auto style = segment ? segment->getStyle() : nullptr;
return style ? style->getLinkHREF() : LLStringUtil::null;
}