summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender')
-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);