Browse Source

FBXLoader fails when no pose nodes found for a node #22743 (#22744)

Check number of pose nodes before accessing them.
Viktor Kovacs 3 years ago
parent
commit
43739ba87e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/jsm/loaders/FBXLoader.js

+ 1 - 1
examples/jsm/loaders/FBXLoader.js

@@ -1421,7 +1421,7 @@ class FBXTreeParser {
 
 			for ( const nodeID in BindPoseNode ) {
 
-				if ( BindPoseNode[ nodeID ].attrType === 'BindPose' ) {
+				if ( BindPoseNode[ nodeID ].attrType === 'BindPose' && BindPoseNode[ nodeID ].NbPoseNodes > 0 ) {
 
 					const poseNodes = BindPoseNode[ nodeID ].PoseNode;