diff options
author | Dave Parks <davep@lindenlab.com> | 2010-06-03 12:53:11 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2010-06-03 12:53:11 -0500 |
commit | 64d51dbc4482c12bc1ae56598b924cfe6f0ff0e9 (patch) | |
tree | 482cc191426a9332d3b900b7f8136f6a340ddb64 /indra/llui/lllineeditor.cpp | |
parent | 8b16faec3096e32b76b227efcb67fd33e7254f40 (diff) | |
parent | 26ba00b5554d20ee958693ced87b36fa7f6e3d99 (diff) |
merge
Diffstat (limited to 'indra/llui/lllineeditor.cpp')
-rw-r--r-- | indra/llui/lllineeditor.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp index 45f9de8e8d..c0cc294c02 100644 --- a/indra/llui/lllineeditor.cpp +++ b/indra/llui/lllineeditor.cpp @@ -377,7 +377,14 @@ void LLLineEditor::setText(const LLStringExplicit &new_text) setCursor(llmin((S32)mText.length(), getCursor())); // Set current history line to end of history. - mCurrentHistoryLine = mLineHistory.end() - 1; + if (mLineHistory.empty()) + { + mCurrentHistoryLine = mLineHistory.end(); + } + else + { + mCurrentHistoryLine = mLineHistory.end() - 1; + } mPrevText = mText; } |