Browse Source

Fix crash when closing prefab window

Jed 3 years ago
parent
commit
1cbc1a3f2f
1 changed files with 1 additions and 0 deletions
  1. 1 0
      h2d/Scene.hx

+ 1 - 0
h2d/Scene.hx

@@ -332,6 +332,7 @@ class Scene extends Layers implements h3d.IDrawable implements hxd.SceneEvents.I
 	@:dox(hide) @:noCompletion
 	public function checkResize() {
 		var engine = h3d.Engine.getCurrent();
+		if (engine == null) return;
 
 		inline function setSceneSize( w : Int, h : Int ) {
 			if ( w != this.width || h != this.height ) {