Fixes #1249 - Don't hang up when destroy is called multiple times (#1250)

fix-openal-soft-deadlink
MeFisto94 5 years ago committed by Stephen Gold
parent 233bc6f0da
commit 124ad35677
  1. 6
      jme3-lwjgl/src/main/java/com/jme3/system/lwjgl/LwjglAbstractDisplay.java

@ -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);

Loading…
Cancel
Save