Explorar el Código

Merge pull request #7323 from ruofeidu/patch-1

Fix null pointer err for some collada models
Mr.doob hace 10 años
padre
commit
9f5f6bae99
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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 ] );