Fixes #1319 - LWJGL2: start(true) should not freeze when context could not be initialized
This commit is contained in:
parent
828ca9212a
commit
7e3ae5e8ca
@ -117,13 +117,15 @@ public abstract class LwjglAbstractDisplay extends LwjglContext implements Runna
|
||||
super.internalCreate();
|
||||
} catch (Exception ex) {
|
||||
try {
|
||||
if (Display.isCreated())
|
||||
if (Display.isCreated()) {
|
||||
Display.destroy();
|
||||
}
|
||||
} catch (Exception ex2){
|
||||
logger.log(Level.WARNING, null, ex2);
|
||||
}
|
||||
|
||||
listener.handleError("Failed to create display", ex);
|
||||
createdLock.notifyAll(); // Release the lock, so start(true) doesn't deadlock.
|
||||
return false; // if we failed to create display, do not continue
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user