summaryrefslogtreecommitdiff
path: root/indra/llui/lllineeditor.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-05-16 12:34:15 -0500
committerDave Parks <davep@lindenlab.com>2011-05-16 12:34:15 -0500
commit8a92612fd976b6e38383d9ee46be5b51053e0998 (patch)
tree0c06d99c2b6a8aaa5c78661b488ff8b59b83c523 /indra/llui/lllineeditor.cpp
parent0b5f662c3bf1655b95dbb92ad3f16bae37ee04f4 (diff)
parentd6fda15c34896db3b911c3719871ce317edaab1d (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;
}