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/trunk@11062 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
ddd12b88b8
commit
561b1c2ddf
@ -190,6 +190,10 @@ public class ObjectHelper extends AbstractBlenderHelper {
|
|||||||
LightHelper lightHelper = blenderContext.getHelper(LightHelper.class);
|
LightHelper lightHelper = blenderContext.getHelper(LightHelper.class);
|
||||||
List<Structure> lampsArray = pLamp.fetchData();
|
List<Structure> lampsArray = pLamp.fetchData();
|
||||||
result = lightHelper.toLight(lampsArray.get(0), blenderContext);
|
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;
|
break;
|
||||||
case CAMERA:
|
case CAMERA:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user