Browse Source

Merge pull request #341 from Temechon/patch-18

Update babylon.mesh.ts
David Catuhe 10 năm trước cách đây
mục cha
commit
244432a137
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      Babylon/Mesh/babylon.mesh.ts

+ 4 - 2
Babylon/Mesh/babylon.mesh.ts

@@ -762,7 +762,9 @@
             var result = new BABYLON.Mesh(name, this.getScene());
 
             // Geometry
-            this._geometry.applyToMesh(result);
+            if (this._geometry) {
+                this._geometry.applyToMesh(result);
+            }
 
             // Deep copy
             BABYLON.Tools.DeepCopy(this, result, ["name", "material", "skeleton"], []);
@@ -1197,4 +1199,4 @@
             return newMesh;
         }
     }
-} 
+}