2
0
Эх сурвалжийг харах

Fix to constraint's influence loading (if IPO of the influence was not present then NPE was raised).

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7697 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Kae..pl 14 жил өмнө
parent
commit
f1c1bc70e9

+ 2 - 1
engine/src/blender/com/jme3/scene/plugins/blender/helpers/v249/ConstraintHelper.java

@@ -662,7 +662,8 @@ public class ConstraintHelper extends AbstractBlenderHelper {
 				for (Structure constraint : constraints) {
 					int type = ((Number) constraint.getFieldValue("type")).intValue();
 					String constraintName = constraint.getFieldValue("name").toString();
-					Ipo ipo = constraintsIpos.get(name).get(constraintName);
+					Map<String, Ipo> ipoMap = constraintsIpos.get(name);
+					Ipo ipo = ipoMap==null ? null : ipoMap.get(constraintName);
 					if (ipo == null) {
 						float enforce = ((Number) constraint.getFieldValue("enforce")).floatValue();
 						ipo = ipoHelper.createIpo(enforce);