From 2d69a5d1597430462472e4a06f8cdbd74b6eb223 Mon Sep 17 00:00:00 2001 From: "Sha..rd" Date: Sat, 10 Nov 2012 21:55:11 +0000 Subject: [PATCH] * Fixed issue 460 git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9988 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java b/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java index 49ba7ceb9..50afcedb7 100644 --- a/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java +++ b/engine/src/niftygui/com/jme3/niftygui/NiftyJmeDisplay.java @@ -56,6 +56,7 @@ public class NiftyJmeDisplay implements SceneProcessor { protected Nifty nifty; protected AssetManager assetManager; protected RenderManager renderManager; + protected InputManager inputManager; protected RenderDeviceJme renderDev; protected InputSystemJme inputSys; protected SoundDeviceJme soundDev; @@ -92,6 +93,7 @@ public class NiftyJmeDisplay implements SceneProcessor { AudioRenderer audioRenderer, ViewPort vp){ this.assetManager = assetManager; + this.inputManager = inputManager; w = vp.getCamera().getWidth(); h = vp.getCamera().getHeight(); @@ -184,6 +186,9 @@ public class NiftyJmeDisplay implements SceneProcessor { public void cleanup() { inited = false; inputSys.reset(); + if (inputManager != null) { + inputManager.removeRawInputListener(inputSys); + } // nifty.exit(); }