浏览代码

Fix emit mesh when primitive is null

TothBenoit 1 年之前
父节点
当前提交
4bb6d8ec27
共有 1 个文件被更改,包括 1 次插入1 次删除
  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 ) {
-		if ( primitive.lodCount() == 1 )
+		if ( primitive == null || primitive.lodCount() == 1 )
 			return;
 
 		if ( ctx.forcedScreenRatio >= 0.0 ) {