Allow JAVA2D to terminate when animation thread dies

When Java2D sketch crashes, closing the window does not stop Event
Dispatch Thread. This fix makes PApplet.exit() do the right thing and
not wait for surface to finish when the thread is already dead.

Fixes #4831
This commit is contained in:
Jakub Valtar
2017-01-20 12:49:23 +01:00
parent c5d9b713b8
commit b531199eb5
+1 -1
View File
@@ -207,7 +207,7 @@ public class PSurfaceNone implements PSurface {
public boolean isStopped() {
return thread == null;
return thread == null || !thread.isAlive();
}