summaryrefslogtreecommitdiffstats
path: root/src/test/com/jogamp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/com/jogamp')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java5
-rw-r--r--src/test/com/jogamp/opengl/test/junit/graph/demos/ui/SceneUIController.java1
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java
index eaac2b1bf..f43a933e4 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java
@@ -267,9 +267,8 @@ public class GPUUISceneGLListener0A implements GLEventListener {
} else {
System.err.println("GPUUISceneGLListener0A: dispose (0)");
}
-
- drawable.removeGLEventListener(sceneUIController);
- sceneUIController.dispose(drawable);
+
+ // sceneUIController will remove itself from the drawable!
GL2ES2 gl = drawable.getGL().getGL2ES2();
regionRenderer.destroy(gl);
diff --git a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/SceneUIController.java b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/SceneUIController.java
index c6d43480a..616dd9b98 100644
--- a/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/SceneUIController.java
+++ b/src/test/com/jogamp/opengl/test/junit/graph/demos/ui/SceneUIController.java
@@ -100,6 +100,7 @@ public class SceneUIController implements GLEventListener{
public void dispose(GLAutoDrawable drawable) {
System.err.println("SceneUIController: dispose");
cDrawable = null;
+ drawable.removeGLEventListener(this);
}
public void reshape(GLAutoDrawable drawable, int x, int y, int width,