From 7d91174b5b2a10d89b31f05d09b170cbb6c4c8ee Mon Sep 17 00:00:00 2001 From: "Sha..om" Date: Wed, 4 May 2011 16:13:17 +0000 Subject: [PATCH] * Throw proper exception in TestJoystick if none found git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7440 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/test/jme3test/input/TestJoystick.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/src/test/jme3test/input/TestJoystick.java b/engine/src/test/jme3test/input/TestJoystick.java index 73c8925c9..aefe98566 100644 --- a/engine/src/test/jme3test/input/TestJoystick.java +++ b/engine/src/test/jme3test/input/TestJoystick.java @@ -21,6 +21,9 @@ public class TestJoystick extends SimpleApplication implements AnalogListener { @Override public void simpleInitApp() { Joystick[] joysticks = inputManager.getJoysticks(); + if (joysticks == null) + throw new IllegalStateException("Cannot find any joysticks!"); + for (Joystick joy : joysticks){ System.out.println(joy.toString()); }