diff --git a/engine/src/lwjgl/com/jme3/input/lwjgl/LwjglMouseInput.java b/engine/src/lwjgl/com/jme3/input/lwjgl/LwjglMouseInput.java index e5afe35a4..a91aab36e 100644 --- a/engine/src/lwjgl/com/jme3/input/lwjgl/LwjglMouseInput.java +++ b/engine/src/lwjgl/com/jme3/input/lwjgl/LwjglMouseInput.java @@ -153,14 +153,17 @@ public class LwjglMouseInput implements MouseInput { public void setNativeCursor(JmeCursor jmeCursor) { try { - Cursor newCursor = new Cursor( - jmeCursor.getWidth(), - jmeCursor.getHeight(), - jmeCursor.getXHotSpot(), - jmeCursor.getYHotSpot(), - jmeCursor.getNumImages(), - jmeCursor.getImagesData(), - jmeCursor.getImagesDelay()); + Cursor newCursor = null; + if (jmeCursor != null) { + newCursor = new Cursor( + jmeCursor.getWidth(), + jmeCursor.getHeight(), + jmeCursor.getXHotSpot(), + jmeCursor.getYHotSpot(), + jmeCursor.getNumImages(), + jmeCursor.getImagesData(), + jmeCursor.getImagesDelay()); + } Mouse.setNativeCursor(newCursor); } catch (LWJGLException ex) { Logger.getLogger(LwjglMouseInput.class.getName()).log(Level.SEVERE, null, ex);