summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp')
-rw-r--r--src/jogl/classes/jogamp/opengl/av/GLMediaPlayerImpl.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/jogl/classes/jogamp/opengl/av/GLMediaPlayerImpl.java b/src/jogl/classes/jogamp/opengl/av/GLMediaPlayerImpl.java
index df4cc7625..f6fc20afe 100644
--- a/src/jogl/classes/jogamp/opengl/av/GLMediaPlayerImpl.java
+++ b/src/jogl/classes/jogamp/opengl/av/GLMediaPlayerImpl.java
@@ -279,9 +279,11 @@ public abstract class GLMediaPlayerImpl implements GLMediaPlayer {
protected void removeAllImageTextures(GLContext ctx) {
if(null != texFrames) {
for(int i=0; i<textureCount; i++) {
- final TextureFrame imgTex = texFrames[i];
- destroyTexImage(ctx, imgTex);
- texFrames[i] = null;
+ final TextureFrame imgTex = texFrames[i];
+ if(null != imgTex) {
+ destroyTexImage(ctx, imgTex);
+ texFrames[i] = null;
+ }
}
}
texFrameMap.clear();