From 31003f13af0940661fe2463c8641f8e4d3bb29ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Wed, 8 Jan 2020 10:05:14 -0500 Subject: [PATCH] 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 --- indra/llui/lltexteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp index 09c8a82c9..989e92ce7 100644 --- a/indra/llui/lltexteditor.cpp +++ b/indra/llui/lltexteditor.cpp @@ -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; }