Kaynağa Gözat

Fix emit mesh when primitive is null

TothBenoit 1 yıl önce
ebeveyn
işleme
4bb6d8ec27
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      h3d/scene/Mesh.hx

+ 1 - 1
h3d/scene/Mesh.hx

@@ -75,7 +75,7 @@ class Mesh extends Object {
 	}
 	}
 
 
 	function calcScreenRatio( ctx : RenderContext ) {
 	function calcScreenRatio( ctx : RenderContext ) {
-		if ( primitive.lodCount() == 1 )
+		if ( primitive == null || primitive.lodCount() == 1 )
 			return;
 			return;
 
 
 		if ( ctx.forcedScreenRatio >= 0.0 ) {
 		if ( ctx.forcedScreenRatio >= 0.0 ) {