浏览代码

fix wrt context lost

Nicolas Cannasse 4 年之前
父节点
当前提交
4f26275e1a
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      hide/comp/Scene.hx

+ 1 - 0
hide/comp/Scene.hx

@@ -261,6 +261,7 @@ class Scene extends Component implements h3d.IDrawable {
 		var path = ide.getPath(img.entry.path);
 		var img = new Element('<img src="file://$path" crossorigin="anonymous"/>');
 		function onLoaded() {
+			if( engine.driver == null ) return;
 			setCurrent();
 			var bmp : js.html.ImageElement = cast img[0];
 			t.resize(bmp.width, bmp.height);