summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-06-11 21:16:08 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-11-12 17:31:36 +0200
commitc1c2830f9b7bf4d91977133ffbcd8d0240bcc7fe (patch)
tree3aa30650d87fe27d4e5dbbfb3c0ec1deb87d4e13
parentcb07acf9fe349a19b63c0d6c3bc65fc66ce5a7a6 (diff)
SL-15391 Crash at getUniformLocation
-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 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];
}