浏览代码

Fix error on blur with no webgl element initialized

trethaller 6 年之前
父节点
当前提交
4ee42b43d2
共有 1 个文件被更改,包括 1 次插入1 次删除
  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) {