优化:避免错误

pull/1884/MERGE
ChenX 2 years ago
parent e0f3bd60fb
commit 49b9757750

@ -219,7 +219,7 @@ export function Entitys2Data(ents: Iterable<Entity>): Data
if (idIndex !== 0)
{
let id = app.Database.GetObjectId(idIndex);
if (id.Object)
if (id?.Object)
{
let mtl = id.Object as PhysicalMaterialRecord;
d.Materials.push(ConverMaterialData(mtl));

Loading…
Cancel
Save