@@ -266,7 +266,11 @@ public abstract class LwjglAbstractDisplay extends LwjglContext implements Runna
this.autoFlush = enabled;
}
- public void destroy(boolean waitFor){
+ public void destroy(boolean waitFor) {
+ if (needClose.get()) {
+ return; // Already destroyed
+ }
+
needClose.set(true);
if (waitFor)
waitFor(false);