summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jake2/render/opengl/Jsr231Driver.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jake2/render/opengl/Jsr231Driver.java b/src/jake2/render/opengl/Jsr231Driver.java
index b065032..9e6c3fa 100644
--- a/src/jake2/render/opengl/Jsr231Driver.java
+++ b/src/jake2/render/opengl/Jsr231Driver.java
@@ -261,9 +261,9 @@ public abstract class Jsr231Driver extends Jsr231GL implements GLDriver {
e.printStackTrace();
}
if (window != null) {
- display.destroy();
+ if (display != null) display.destroy();
window.dispose();
- while (window.isDisplayable() || display.isDisplayable()) {
+ while (window.isDisplayable()) {
try {
Thread.sleep(50);
} catch (InterruptedException e) {