diff options
author | Carsten Weisse <[email protected]> | 2004-10-28 00:38:29 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2004-10-28 00:38:29 +0000 |
commit | a613db440d8077a1d4bd9a941d1b486f59b23d70 (patch) | |
tree | 929b126da8f3be522c398df06e77bfa43423410d /src/jake2/render/JoglBase.java | |
parent | e747c5a59bcf022b518ef8d9e60d207c9216f5df (diff) |
this solves the JVM hangup problem on GL context destruction;
at first remove the GLCanvas and then destroy the Frame
Diffstat (limited to 'src/jake2/render/JoglBase.java')
-rw-r--r-- | src/jake2/render/JoglBase.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/jake2/render/JoglBase.java b/src/jake2/render/JoglBase.java index 201db1a..e4dcc1d 100644 --- a/src/jake2/render/JoglBase.java +++ b/src/jake2/render/JoglBase.java @@ -2,7 +2,7 @@ * JoglCommon.java * Copyright (C) 2004 * - * $Id: JoglBase.java,v 1.9 2004-09-19 20:32:05 cawe Exp $ + * $Id: JoglBase.java,v 1.10 2004-10-28 00:38:29 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -282,7 +282,13 @@ public abstract class JoglBase implements GLEventListener { e.printStackTrace(); } } - if (this.window != null) { + if (window != null) { + // this is very important to change the GL context + if (canvas != null) { + canvas.setVisible(false); + window.remove(canvas); + canvas = null; + } window.dispose(); } post_init = false; |