* 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
3.0
sha..rd 13 years ago
parent 2d93b713f3
commit 2d1b2b7948
  1. 5
      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();
}
}
});
}

Loading…
Cancel
Save