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