SDK: fix NPE in JmeGeometry.propertyChange

experimental
David Bernard 11 years ago
parent 16beac352f
commit 2f248d15df
  1. 4
      sdk/jme3-core/src/com/jme3/gde/core/sceneexplorer/nodes/JmeGeometry.java

@ -155,7 +155,9 @@ public class JmeGeometry extends JmeSpatial implements MaterialChangeListener {
public void run() { public void run() {
try { try {
SceneExplorerTopComponent.findInstance().swapMaterialChangeListener(JmeGeometry.this, ((Material) before).getAssetName(), ((Material) after).getAssetName()); String beforeName = (before == null)? null : ((Material) before).getAssetName();
String afterName = (after == null)? null : ((Material) after).getAssetName();
SceneExplorerTopComponent.findInstance().swapMaterialChangeListener(JmeGeometry.this, beforeName, afterName);
} catch (Exception e) { } catch (Exception e) {
Exceptions.printStackTrace(e); Exceptions.printStackTrace(e);
} }

Loading…
Cancel
Save