From 767231a4a81ee25bac1ca8ee39a842a48a3010d4 Mon Sep 17 00:00:00 2001 From: "PSp..om" Date: Mon, 23 Dec 2013 02:11:32 +0000 Subject: [PATCH] Fixed an NPE in the FlyCamAppState that occurred when shutting down an app with no InputManager. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10945 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/app/FlyCamAppState.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/src/core/com/jme3/app/FlyCamAppState.java b/engine/src/core/com/jme3/app/FlyCamAppState.java index 5a7b11e95..11d3e3fa2 100644 --- a/engine/src/core/com/jme3/app/FlyCamAppState.java +++ b/engine/src/core/com/jme3/app/FlyCamAppState.java @@ -87,7 +87,9 @@ public class FlyCamAppState extends AbstractAppState { public void cleanup() { super.cleanup(); - flyCam.unregisterInput(); + if (app.getInputManager() != null) { + flyCam.unregisterInput(); + } }