From a22f6772e695b22a8320c49f6c130cc416af3bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Bouquet?= Date: Sat, 18 Jul 2015 21:49:27 +0200 Subject: [PATCH] fixed a NPE in the shader node editor when the navigator panel is collapsed --- .../gde/materialdefinition/editor/MatDefEditorlElement.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/MatDefEditorlElement.java b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/MatDefEditorlElement.java index 762b24ef5..42fbba18b 100644 --- a/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/MatDefEditorlElement.java +++ b/sdk/jme3-materialeditor/src/com/jme3/gde/materialdefinition/editor/MatDefEditorlElement.java @@ -272,6 +272,11 @@ public final class MatDefEditorlElement extends JPanel implements MultiViewEleme protected void selectionChanged(Selectable selectable) { MatDefNavigatorPanel nav = obj.getLookup().lookup(MatDefNavigatorPanel.class); + //It's possible that the navigator is null if it's collapsed in the ui. + //In that case we early return to avoid further issues + if(nav == null){ + return; + } try { Node n = findNode(nav.getExplorerManager().getRootContext(), selectable.getKey()); if (n == null) {