diff options
author | Dave Parks <davep@lindenlab.com> | 2012-02-08 19:01:08 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-02-08 19:01:08 -0600 |
commit | e0582d4bc71e2f367b4cf4a6f0b808451620b52f (patch) | |
tree | f63cff6aefda55fe3a5e952b7688bb89ccc710e7 /indra/llrender | |
parent | d10bcca167e2d4332dced910660aa1a6a85bc175 (diff) |
Fix for Debug GL generating errors when changing graphics preferences (reloading shaders).
Diffstat (limited to 'indra/llrender')
-rw-r--r-- | indra/llrender/llglslshader.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp index 3773568ad8..7eba62e59e 100644 --- a/indra/llrender/llglslshader.cpp +++ b/indra/llrender/llglslshader.cpp @@ -109,7 +109,10 @@ void LLGLSLShader::unload() glGetAttachedObjectsARB(mProgramObject, 1024, &count, obj); for (GLsizei i = 0; i < count; i++) { - glDeleteObjectARB(obj[i]); + if (glIsProgramARB(obj[i])) + { + glDeleteObjectARB(obj[i]); + } } glDeleteObjectARB(mProgramObject); |