aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-04-03 13:49:04 -0700
committerMcCabe Maxsted2010-04-03 13:51:24 -0700
commitcae3ab7be04c4ab007e8d121d3aa6fca89a7a285 (patch)
tree1cbc20fd706e8a1f10c3a23c18c61b8bf510ba0f
parentAdded button to create a new template notecard for the AO (diff)
downloadmeta-impy-cae3ab7be04c4ab007e8d121d3aa6fca89a7a285.zip
meta-impy-cae3ab7be04c4ab007e8d121d3aa6fca89a7a285.tar.gz
meta-impy-cae3ab7be04c4ab007e8d121d3aa6fca89a7a285.tar.bz2
meta-impy-cae3ab7be04c4ab007e8d121d3aa6fca89a7a285.tar.xz
Potential fix for a rare crash when creating notecards in the AO
-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 b0229be..c4f839b 100644
--- a/linden/indra/llui/lltexteditor.cpp
+++ b/linden/indra/llui/lltexteditor.cpp
@@ -751,7 +751,14 @@ S32 LLTextEditor::getLineStart( S32 line ) const
751 S32 segoffset = mLineStartList[line].mOffset; 751 S32 segoffset = mLineStartList[line].mOffset;
752 LLTextSegment* seg = mSegments[segidx]; 752 LLTextSegment* seg = mSegments[segidx];
753 S32 res = seg->getStart() + segoffset; 753 S32 res = seg->getStart() + segoffset;
754 if (res > seg->getEnd()) llerrs << "wtf" << llendl; 754 if (res > seg->getEnd())
755 {
756 //llerrs << "wtf" << llendl;
757 // This happens when creating a new notecard using the AO on certain opensims.
758 // Play it safe instead of bringing down the viewer - MC
759 llwarns << "BAD JOOJOO! Text length (" << res << ") greater than text end (" << seg->getEnd() << "). Setting line start to " << seg->getEnd() << llendl;
760 res = seg->getEnd();
761 }
755 return res; 762 return res;
756} 763}
757 764