|
From: <eli...@us...> - 2006-11-10 11:44:05
|
Revision: 2638
http://svn.sourceforge.net/java-game-lib/?rev=2638&view=rev
Author: elias_naur
Date: 2006-11-10 03:44:00 -0800 (Fri, 10 Nov 2006)
Log Message:
-----------
AWTGLCanvas: Make sure we don't paint while destroying the canvas
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2006-11-10 10:20:44 UTC (rev 2637)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/AWTGLCanvas.java 2006-11-10 11:44:00 UTC (rev 2638)
@@ -191,8 +191,10 @@
* @see java.awt.Component#removeNotify()
*/
public void removeNotify() {
- destroyContext();
- super.removeNotify();
+ synchronized (SYNC_LOCK) {
+ destroyContext();
+ super.removeNotify();
+ }
}
/**
@@ -284,6 +286,8 @@
*/
public final void paint(Graphics g) {
synchronized (SYNC_LOCK) {
+ if (!isDisplayable())
+ return;
try {
if (peer_info == null) {
this.peer_info = implementation.createPeerInfo(this, pixel_format);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|