summaryrefslogtreecommitdiffstats
path: root/src/net/java/games
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-02-23 00:01:23 +0000
committerKenneth Russel <[email protected]>2005-02-23 00:01:23 +0000
commitcc03005c049d3dbdbda27975055dea5ae391085f (patch)
treecfbaac57816812afc661efab478eeb808475c7ba /src/net/java/games
parent3c4de5b235dff7a2bb98ccd1e7e35f82e8e8cd55 (diff)
Fixed Issue 143: Pbuffer creation in display() causes exception
Fixed / worked around problem found by user mustang on the javagaming forums where if a recursive makeCurrent failed, it would incorrectly end up freeing the parent context. Not completely confident of this bug fix, but definitely fixes the mentioned problem and doesn't appear to break any of the demos. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@233 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games')
-rw-r--r--src/net/java/games/jogl/impl/GLContext.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/net/java/games/jogl/impl/GLContext.java b/src/net/java/games/jogl/impl/GLContext.java
index aab3f9dd0..17667fbce 100644
--- a/src/net/java/games/jogl/impl/GLContext.java
+++ b/src/net/java/games/jogl/impl/GLContext.java
@@ -251,6 +251,15 @@ public abstract class GLContext {
if (isReshape) {
deferredReshapeAction = runnable;
}
+
+ // Clean up after ourselves on the way out.
+ // NOTE that this is an abbreviated version of the code below
+ // and should probably be refactored/cleaned up -- this bug
+ // fix was done without a lot of intense thought about the
+ // situation
+ if (curContext != null) {
+ curContext.makeCurrent(curInitAction);
+ }
return;
}
if (DEBUG) {