Browse Source

Merge pull request #7323 from ruofeidu/patch-1

Fix null pointer err for some collada models
Mr.doob 9 years ago
parent
commit
9f5f6bae99
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/objects/SkinnedMesh.js

+ 1 - 1
src/objects/SkinnedMesh.js

@@ -43,7 +43,7 @@ THREE.SkinnedMesh = function ( geometry, material, useVertexTexture ) {
 
 			gbone = this.geometry.bones[ b ];
 
-			if ( gbone.parent !== - 1 ) {
+			if ( gbone.parent !== - 1 && gbone.parent !== null) {
 
 				bones[ gbone.parent ].add( bones[ b ] );