Bugfix: fixed an issue that could cause NPE when lamp that is not supported in JME ('Hemi' light for example) had children nodes attached.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/branches/gradle-restructure@11062 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
Kae..pl 2014-02-22 17:51:45 +00:00
parent f3457c2f52
commit 7d6ea02b90

View File

@ -190,6 +190,10 @@ public class ObjectHelper extends AbstractBlenderHelper {
LightHelper lightHelper = blenderContext.getHelper(LightHelper.class);
List<Structure> lampsArray = pLamp.fetchData();
result = lightHelper.toLight(lampsArray.get(0), blenderContext);
if(result == null) {
//probably some light type is not supported, just create a node so that we can maintain child-parent relationship for nodes
result = new Node(name);
}
}
break;
case CAMERA: