diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-06-11 21:16:08 +0300 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2021-11-19 14:43:20 -0500 |
commit | 3b3ff53eb53db023462eba0283ef7586e79df35a (patch) | |
tree | 208cced3b708b6e6da55a5d996cd89692dfc39c1 /indra/llrender | |
parent | 80ac5d49d950a773768550070dd272a58c95c245 (diff) |
SL-15391 Crash at getUniformLocation
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 0e4753fcc6..08c9dd8769 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -1436,7 +1436,11 @@ GLint LLGLSLShader::getUniformLocation(U32 index) GLint ret = -1; if (mProgramObject) { - llassert(index < mUniform.size()); + if (index >= mUniform.size()) + { + LL_WARNS_ONCE("Shader") << "Uniform index " << index << " out of bounds " << (S32)mUniform.size() << LL_ENDL; + return ret; + } return mUniform[index]; } |