From 1ec02bdd6a6c0f81bdd9bf11dce50baea6a2233f Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 3 Apr 2010 13:49:04 -0700 Subject: Potential fix for a rare crash when creating notecards in the AO --- linden/indra/llui/lltexteditor.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'linden/indra') 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 S32 segoffset = mLineStartList[line].mOffset; LLTextSegment* seg = mSegments[segidx]; S32 res = seg->getStart() + segoffset; - if (res > seg->getEnd()) llerrs << "wtf" << llendl; + if (res > seg->getEnd()) + { + //llerrs << "wtf" << llendl; + // This happens when creating a new notecard using the AO on certain opensims. + // Play it safe instead of bringing down the viewer - MC + llwarns << "BAD JOOJOO! Text length (" << res << ") greater than text end (" << seg->getEnd() << "). Setting line start to " << seg->getEnd() << llendl; + res = seg->getEnd(); + } return res; } -- cgit v1.1