Browse Source

[material] fix editor crash for regular materials

Clément Espeute 1 năm trước cách đây
mục cha
commit
b45afe38f5
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      hrt/prefab/Material.hx

+ 1 - 1
hrt/prefab/Material.hx

@@ -126,7 +126,7 @@ class Material extends Prefab {
 		var cur = this.parent;
 		while(cur != null) {
 			var obj3d = Std.downcast(cur, Object3D);
-			if (obj3d != null) {
+			if (obj3d != null && obj3d.local3d != null) {
 				if (obj3d.local3d.numChildren > 0) {
 					isMatLib = false;
 					break;