Browse Source

minor fix

Nicolas Cannasse 5 years ago
parent
commit
6e029c68a4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      hrt/prefab/Object3D.hx

+ 2 - 0
hrt/prefab/Object3D.hx

@@ -178,6 +178,8 @@ class Object3D extends Prefab {
 
 
 			var localMat = mesh.getAbsPos().clone();
 			var localMat = mesh.getAbsPos().clone();
 			localMat.multiply(localMat, invRootMat);
 			localMat.multiply(localMat, invRootMat);
+
+			if( mesh.primitive == null ) continue;
 			var lb = mesh.primitive.getBounds().clone();
 			var lb = mesh.primitive.getBounds().clone();
 			lb.transform(localMat);
 			lb.transform(localMat);
 			bounds.add(lb);
 			bounds.add(lb);