From 2d1b2b7948c11c9cf1a0500befe0335064f17d9d Mon Sep 17 00:00:00 2001 From: "sha..rd" Date: Sat, 3 Sep 2011 19:44:45 +0000 Subject: [PATCH] * 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 --- .../com/jme3/system/lwjgl/LwjglAbstractDisplay.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglAbstractDisplay.java b/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglAbstractDisplay.java index 5ec0a68be..b1171cd32 100644 --- a/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglAbstractDisplay.java +++ b/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(); + } } }); }