summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-02-08 19:01:08 -0600
committerDave Parks <davep@lindenlab.com>2012-02-08 19:01:08 -0600
commite0582d4bc71e2f367b4cf4a6f0b808451620b52f (patch)
treef63cff6aefda55fe3a5e952b7688bb89ccc710e7 /indra
parentd10bcca167e2d4332dced910660aa1a6a85bc175 (diff)
Fix for Debug GL generating errors when changing graphics preferences (reloading shaders).
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llglslshader.cpp5
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);