Fixed bug when cloning a mesh without any geometry (loaded from asset loader for example)
@@ -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;
}
-}
+}