浏览代码

Fix null pointer exception adding guard.

clementlandrin 4 年之前
父节点
当前提交
125889c5b3
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      h3d/scene/Renderer.hx

+ 2 - 1
h3d/scene/Renderer.hx

@@ -56,7 +56,8 @@ class Renderer extends hxd.impl.AnyProps {
 			p.dispose();
 		for( f in effects )
 			f.dispose();
-		ctx.lightSystem.dispose();
+		if ( ctx.lightSystem != null )
+			ctx.lightSystem.dispose();
 		passObjects = new Map();
 	}