diff options
author | Sven Gothel <[email protected]> | 2011-05-17 19:03:11 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-05-17 19:03:11 +0200 |
commit | 23163408131b077362439ec4f898d0ad3ce084e1 (patch) | |
tree | 3c076422a4b9966b4d1d9294ccefa66249d71a2a /src/jogl | |
parent | 4dab9cfb6526d1c53a8c796c4e102264d11dc0cb (diff) |
Fix ShaderProgram double destroy()
Diffstat (limited to 'src/jogl')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java index 2f40363d6..565b5ab1c 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java +++ b/src/jogl/classes/com/jogamp/opengl/util/glsl/ShaderProgram.java @@ -95,8 +95,10 @@ public class ShaderProgram { } allShaderCode.clear(); attachedShaderCode.clear(); - gl.glDeleteProgram(shaderProgram); - shaderProgram=-1; + if(0<=shaderProgram) { + gl.glDeleteProgram(shaderProgram); + shaderProgram=-1; + } } // |