瀏覽代碼

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;