summaryrefslogtreecommitdiff
path: root/indra/llui/lllineeditor.cpp
diff options
context:
space:
mode:
authorLeyla Farazha <leyla@lindenlab.com>2011-06-07 17:16:49 -0700
committerLeyla Farazha <leyla@lindenlab.com>2011-06-07 17:16:49 -0700
commit1361eeae4e4538c175a32d48246897c4659cc26c (patch)
tree19687f65cc1c51b3247d0d1cd665b19c1a41a1e4 /indra/llui/lllineeditor.cpp
parentbff172b374fa12e646d427e09f2ffac4289ab654 (diff)
parentcf31723a1a258e0452dd26d9f5eb5fcdac290e05 (diff)
merge
Diffstat (limited to 'indra/llui/lllineeditor.cpp')
-rw-r--r--indra/llui/lllineeditor.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llui/lllineeditor.cpp b/indra/llui/lllineeditor.cpp
index d99ee5a545..0196080d90 100644
--- a/indra/llui/lllineeditor.cpp
+++ b/indra/llui/lllineeditor.cpp
@@ -389,7 +389,11 @@ void LLLineEditor::setText(const LLStringExplicit &new_text)
setCursor(llmin((S32)mText.length(), getCursor()));
// Set current history line to end of history.
- if(mLineHistory.end() != mLineHistory.begin())
+ if (mLineHistory.empty())
+ {
+ mCurrentHistoryLine = mLineHistory.end();
+ }
+ else
{
mCurrentHistoryLine = mLineHistory.end() - 1;
}