diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2021-11-12 12:10:44 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2021-11-12 12:10:44 -0500 |
commit | 5188a26a8521251dda07ac0140bb129f28417e49 (patch) | |
tree | 3a2239ad294f3cd33926416264e0bcbe520e8b9c /indra/llrender | |
parent | 75110629de7786d667ea7c90b025f97c22650316 (diff) | |
parent | 819088563e13f1d75e048311fbaf0df4a79b7e19 (diff) |
SL-16220: Merge branch 'origin/DRTVWR-546' into glthread
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llgl.cpp | 2 | ||||
-rw-r--r-- | indra/llrender/llglslshader.cpp | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 4f9aa5f979..c7f85aec21 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -557,7 +557,7 @@ bool LLGLManager::initGL() glGetIntegerv(GL_NUM_EXTENSIONS, &count); for (GLint i = 0; i < count; ++i) { - std::string ext((const char*) glGetStringi(GL_EXTENSIONS, i)); + std::string ext = ll_safe_string((const char*) glGetStringi(GL_EXTENSIONS, i)); str << ext << " "; LL_DEBUGS("GLExtensions") << ext << LL_ENDL; } 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]; } |