diff options
author | Aleric Inglewood | 2010-10-22 00:51:53 +0200 |
---|---|---|
committer | Aleric Inglewood | 2010-10-22 00:51:53 +0200 |
commit | 7c4e01af677907b75694b9c4827d6f3ba56a5e19 (patch) | |
tree | fd743d3cefc7d4e671c6a6429be50e76191bbd9c /linden/indra/llui | |
parent | Don't dump callstacks at clean exit of viewer. (diff) | |
parent | Changed version to Experimental 2010.10.17 (diff) | |
download | meta-impy-7c4e01af677907b75694b9c4827d6f3ba56a5e19.zip meta-impy-7c4e01af677907b75694b9c4827d6f3ba56a5e19.tar.gz meta-impy-7c4e01af677907b75694b9c4827d6f3ba56a5e19.tar.bz2 meta-impy-7c4e01af677907b75694b9c4827d6f3ba56a5e19.tar.xz |
Merge branch 'weekly' of http://github.com/imprudence/imprudence into weekly
Diffstat (limited to 'linden/indra/llui')
-rw-r--r-- | linden/indra/llui/lllineeditor.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/linden/indra/llui/lllineeditor.cpp b/linden/indra/llui/lllineeditor.cpp index e73b287..a3785e4 100644 --- a/linden/indra/llui/lllineeditor.cpp +++ b/linden/indra/llui/lllineeditor.cpp | |||
@@ -416,7 +416,16 @@ void LLLineEditor::setText(const LLStringExplicit &new_text) | |||
416 | setCursor(llmin((S32)mText.length(), getCursor())); | 416 | setCursor(llmin((S32)mText.length(), getCursor())); |
417 | 417 | ||
418 | // Set current history line to end of history. | 418 | // Set current history line to end of history. |
419 | mCurrentHistoryLine = mLineHistory.end() - 1; | 419 | // RC Fix, its really not safe to just take 1 of the end itterator, if end==begin |
420 | // that leaves an invalid state upseting the secure STL checks | ||
421 | if(mLineHistory.empty()) | ||
422 | { | ||
423 | mCurrentHistoryLine = mLineHistory.begin(); | ||
424 | } | ||
425 | else | ||
426 | { | ||
427 | mCurrentHistoryLine = mLineHistory.end() - 1; | ||
428 | } | ||
420 | 429 | ||
421 | mPrevText = mText; | 430 | mPrevText = mText; |
422 | } | 431 | } |