diff options
author | McCabe Maxsted | 2010-04-03 13:49:04 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-04-03 13:51:24 -0700 |
commit | cae3ab7be04c4ab007e8d121d3aa6fca89a7a285 (patch) | |
tree | 1cbc20fd706e8a1f10c3a23c18c61b8bf510ba0f | |
parent | Added button to create a new template notecard for the AO (diff) | |
download | meta-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.cpp | 9 |
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 | ||