diff options
author | nat-goodspeed <nat@lindenlab.com> | 2024-09-09 17:14:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 17:14:35 -0400 |
commit | 0c451a60b7fe859f9deeaefb6360e96ec9af630f (patch) | |
tree | 6c1bfbbef656b818f026a371136d345e88a41c71 /indra/llui | |
parent | 04568da18d2261f3f7b851cf5341b766c9648204 (diff) | |
parent | 0c42147fabaef31a2c577fc009dec354447c2e7f (diff) |
Merge pull request #2523 from secondlife/lua-feature-flag
Put viewer's Lua functionality behind a feature flag, default off.
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llmenugl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp index 69ffa9a94f..cc770ca90a 100644 --- a/indra/llui/llmenugl.cpp +++ b/indra/llui/llmenugl.cpp @@ -2625,7 +2625,9 @@ void LLMenuGL::insert( S32 position, LLView * ctrl, bool arrange /*= true*/ ) { LLMenuItemGL * item = dynamic_cast<LLMenuItemGL *>(ctrl); - if (NULL == item || position < 0 || position >= mItems.size()) + // If position == size(), std::advance() will return end() -- which is + // okay, because insert(end()) is the same as append(). + if (NULL == item || position < 0 || position > mItems.size()) { return; } |