Browse Source

Fix error on blur with no webgl element initialized

trethaller 6 years ago
parent
commit
4ee42b43d2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hide/Ide.hx

+ 1 - 1
hide/Ide.hx

@@ -121,7 +121,7 @@ class Ide {
 					return;
 			window.close(true);
 		});
-		window.on("blur", function() { hxd.Key.initialize(); });
+		window.on("blur", function() { if( h3d.Engine.getCurrent() != null && !hasReloaded ) hxd.Key.initialize(); });
 
 		// handle commandline parameters
 		nw.App.on("open", function(cmd) {