Bugfix: fixed a bug that caused an NPE exception which occured when IPO had no curves attached.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10232 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
Kae..pl 2013-01-29 14:46:43 +00:00
parent 2b94486677
commit a37b8114b9

@ -184,8 +184,10 @@ public class ModifierHelper extends AbstractBlenderHelper {
Structure actionStructure = pAction.fetchData(blenderContext.getInputStream()).get(0); Structure actionStructure = pAction.fetchData(blenderContext.getInputStream()).get(0);
IpoHelper ipoHelper = blenderContext.getHelper(IpoHelper.class); IpoHelper ipoHelper = blenderContext.getHelper(IpoHelper.class);
Ipo ipo = ipoHelper.fromAction(actionStructure, blenderContext); Ipo ipo = ipoHelper.fromAction(actionStructure, blenderContext);
result = new ObjectAnimationModifier(ipo, actionStructure.getName(), objectStructure.getOldMemoryAddress(), blenderContext); if(ipo != null) {//ipo can be null if it has no curves applied, ommit such modifier then
blenderContext.addModifier(objectStructure.getOldMemoryAddress(), result); result = new ObjectAnimationModifier(ipo, actionStructure.getName(), objectStructure.getOldMemoryAddress(), blenderContext);
blenderContext.addModifier(objectStructure.getOldMemoryAddress(), result);
}
} }
} }
return result; return result;