summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-06-11 21:16:08 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-06-11 21:17:22 +0300
commitb854eceee3a867d64b20de18d6b7ce91b33abed0 (patch)
tree8aabf9c6589b925542ad99f129dc189bc1bfae28 /indra
parentc3d7cd4ac12fd73bf3d7abd402312765a71e06c3 (diff)
SL-15391 Crash at getUniformLocation
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llglslshader.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 42b8c35442..d3942c7552 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -1427,7 +1427,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];
}