Explorar o código

[material] fix editor crash for regular materials

Clément Espeute hai 1 ano
pai
achega
b45afe38f5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;