summaryrefslogtreecommitdiff
path: root/indra/llui/lltexteditor.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@geenzo.com>2025-04-01 13:10:33 -0400
committerJonathan "Geenz" Goodman <geenz@geenzo.com>2025-04-01 13:10:33 -0400
commitccdcbfeebd10a78cfb67f5324a3eb17a7d76604b (patch)
tree9543eb9393ea9f20b3199c86c48a5b4fc5b3f5e1 /indra/llui/lltexteditor.cpp
parent497c309a5b148fd86a0e1429343092f0a6ca2e0d (diff)
parent4ddd9d1fefc3b956e19ef25cfdd199fde352437a (diff)
Merge branch 'release/2025.03' into release/2025.04
Diffstat (limited to 'indra/llui/lltexteditor.cpp')
-rw-r--r--indra/llui/lltexteditor.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/llui/lltexteditor.cpp b/indra/llui/lltexteditor.cpp
index 6c59ed0fd9..fe4cce29ab 100644
--- a/indra/llui/lltexteditor.cpp
+++ b/indra/llui/lltexteditor.cpp
@@ -209,8 +209,15 @@ public:
}
virtual bool execute( LLTextBase* editor, S32* delta )
{
- mWString = editor->getWText().substr(getPosition(), mLen);
- *delta = remove(editor, getPosition(), mLen );
+ try
+ {
+ mWString = editor->getWText().substr(getPosition(), mLen);
+ *delta = remove(editor, getPosition(), mLen);
+ }
+ catch (std::out_of_range&)
+ {
+ return false;
+ }
return (*delta != 0);
}
virtual S32 undo( LLTextBase* editor )