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
This commit is contained in:
		
							parent
							
								
									d1b0ff04d1
								
							
						
					
					
						commit
						f1c1bc70e9
					
				| @ -662,7 +662,8 @@ public class ConstraintHelper extends AbstractBlenderHelper { | |||||||
| 				for (Structure constraint : constraints) { | 				for (Structure constraint : constraints) { | ||||||
| 					int type = ((Number) constraint.getFieldValue("type")).intValue(); | 					int type = ((Number) constraint.getFieldValue("type")).intValue(); | ||||||
| 					String constraintName = constraint.getFieldValue("name").toString(); | 					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) { | 					if (ipo == null) { | ||||||
| 						float enforce = ((Number) constraint.getFieldValue("enforce")).floatValue(); | 						float enforce = ((Number) constraint.getFieldValue("enforce")).floatValue(); | ||||||
| 						ipo = ipoHelper.createIpo(enforce); | 						ipo = ipoHelper.createIpo(enforce); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user