Browse Source

Fix null pointer exception adding guard.

clementlandrin 4 years ago
parent
commit
125889c5b3
1 changed files with 2 additions and 1 deletions
  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();
 	}