aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-04-03 13:49:04 -0700
committerMcCabe Maxsted2010-09-06 20:14:25 -0700
commit1ec02bdd6a6c0f81bdd9bf11dce50baea6a2233f (patch)
treefd0bf513dc3e5cd4077b252d70bddfccde4464a9 /linden/indra
parentFixed regression of #245 (diff)
downloadmeta-impy-1ec02bdd6a6c0f81bdd9bf11dce50baea6a2233f.zip
meta-impy-1ec02bdd6a6c0f81bdd9bf11dce50baea6a2233f.tar.gz
meta-impy-1ec02bdd6a6c0f81bdd9bf11dce50baea6a2233f.tar.bz2
meta-impy-1ec02bdd6a6c0f81bdd9bf11dce50baea6a2233f.tar.xz
Potential fix for a rare crash when creating notecards in the AO
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/llui/lltexteditor.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp
index 8123af2..6e5cdc4 100644
--- a/linden/indra/llui/lltexteditor.cpp
+++ b/linden/indra/llui/lltexteditor.cpp
@@ -951,7 +951,14 @@ S32 LLTextEditor::getLineStart( S32 line ) const
951 S32 segoffset = mLineStartList[line].mOffset; 951 S32 segoffset = mLineStartList[line].mOffset;
952 LLTextSegment* seg = mSegments[segidx]; 952 LLTextSegment* seg = mSegments[segidx];
953 S32 res = seg->getStart() + segoffset; 953 S32 res = seg->getStart() + segoffset;
954 if (res > seg->getEnd()) llerrs << "wtf" << llendl; 954 if (res > seg->getEnd())
955 {
956 //llerrs << "wtf" << llendl;
957 // This happens when creating a new notecard using the AO on certain opensims.
958 // Play it safe instead of bringing down the viewer - MC
959 llwarns << "BAD JOOJOO! Text length (" << res << ") greater than text end (" << seg->getEnd() << "). Setting line start to " << seg->getEnd() << llendl;
960 res = seg->getEnd();
961 }
955 return res; 962 return res;
956} 963}
957 964