Procházet zdrojové kódy

fix wrt context lost

Nicolas Cannasse před 4 roky
rodič
revize
4f26275e1a
1 změnil soubory, kde provedl 1 přidání a 0 odebrání
  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);