aadarshasubedi / jmonkeyengine

Automatically exported from code.google.com/p/jmonkeyengine
0 stars 0 forks source link

MotionPath.disableDebugShape() NPE crash #649

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It is possible to crash this function, it is not protected.
A low priority fix, but nice :-)
Please check debugNode for null.
Thanks! Tom H.

    public void disableDebugShape() {

        debugNode.detachAllChildren(); <-- line 274
        debugNode = null;
        assetManager = null;
    } 

Mar 01, 2015 12:54:34 PM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
java.lang.NullPointerException
    at com.jme3.cinematic.MotionPath.disableDebugShape(MotionPath.java:274)
    at mygame.appState.Scene4AppState.togglePathDisplay(Scene4AppState.java:628)

Original issue reported on code.google.com by tdhargra...@gmail.com on 1 Mar 2015 at 9:08