diff options
author | Sven Gothel <[email protected]> | 2012-11-11 08:55:28 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-11-11 08:55:28 +0100 |
commit | 802404e08476387f656115b8542366706d7eeb3f (patch) | |
tree | eedc517044681fb1ccbc19f9a2090b8f9082bdf9 /src/test/com/jogamp/opengl | |
parent | f96efda203f1ebf79c84b3445efdd824537d6e2e (diff) |
Fix Graph SceneUIController: Remove Listener by itself in dispose()
Diffstat (limited to 'src/test/com/jogamp/opengl')
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/graph/demos/GPUUISceneGLListener0A.java | 5 | ||||
-rw-r--r-- | src/test/com/jogamp/opengl/test/junit/graph/demos/ui/SceneUIController.java | 1 |
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, |