Browse Source

Fix null access

trethaller 6 years ago
parent
commit
2f1e2f0a23
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hide/comp/Scene.hx

+ 1 - 1
hide/comp/Scene.hx

@@ -407,7 +407,7 @@ class Scene extends Component implements h3d.IDrawable {
 			hmd = e.toModel().toHmd();
 			hmd = e.toModel().toHmd();
 		}
 		}
 
 
-		if (!reload) {
+		if (!reload && e != null) {
 			e.watch(function() {
 			e.watch(function() {
 				var lib = e.toModel().toHmd();
 				var lib = e.toModel().toHmd();
 				hmdCache.set(key, lib);
 				hmdCache.set(key, lib);