Преглед изворни кода

Merge pull request #18397 from soccer1mt/dev

GLTFExporter: Add null check for skeleton while processing skinned mesh.
Michael Herzog пре 5 година
родитељ
комит
c3cbf55002
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      examples/js/exporters/GLTFExporter.js

+ 3 - 0
examples/js/exporters/GLTFExporter.js

@@ -1646,6 +1646,9 @@ THREE.GLTFExporter.prototype = {
 			var node = outputJSON.nodes[ nodeMap.get( object ) ];
 
 			var skeleton = object.skeleton;
+
+			if ( skeleton === undefined ) return null;
+
 			var rootJoint = object.skeleton.bones[ 0 ];
 
 			if ( rootJoint === undefined ) return null;