aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-05-17 08:44:40 +0200
committerSven Gothel <[email protected]>2013-05-17 08:44:40 +0200
commit1cc44101bd4f44407929c686d3c6e00d36793495 (patch)
treee7b11d9c58a316bcff8c882f029927fda1510b9f /src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
parentaef87b5db07d6b3f556d72ac7492fa0fba0d2de0 (diff)
JOGL GLSL ShaderProgram/State: Release of an unlinked ShaderProgram shall not throw an exception -> avoid calling useProgram(.., false).
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
index a221cd51e..968391976 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderState.java
@@ -231,7 +231,7 @@ public class ShaderState {
* @see ShaderProgram#release(GL2ES2, boolean)
*/
public synchronized void release(GL2ES2 gl, boolean destroyBoundAttributes, boolean destroyShaderProgram, boolean destroyShaderCode) {
- if(null!=shaderProgram) {
+ if(null!=shaderProgram && shaderProgram.linked() ) {
shaderProgram.useProgram(gl, false);
}
if(destroyBoundAttributes) {