Browse Source

* Fixed "jME3 ate my mouse" Linux bug when an exception occurs

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8161 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
sha..rd 14 years ago
parent
commit
2d1b2b7948

+ 5 - 0
engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglAbstractDisplay.java

@@ -97,6 +97,11 @@ public abstract class LwjglAbstractDisplay extends LwjglContext implements Runna
                 Thread.currentThread().setUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
                     public void uncaughtException(Thread thread, Throwable thrown) {
                         listener.handleError("Uncaught exception thrown in "+thread.toString(), thrown);
+                        if (needClose.get()){
+                            // listener.handleError() has requested the 
+                            // context to close. Satisfy request.
+                            deinitInThread();
+                        }
                     }
                 });
             }