Преглед на файлове

Fix crash when closing prefab window

Jed преди 3 години
родител
ревизия
1cbc1a3f2f
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  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
 	@:dox(hide) @:noCompletion
 	public function checkResize() {
 	public function checkResize() {
 		var engine = h3d.Engine.getCurrent();
 		var engine = h3d.Engine.getCurrent();
+		if (engine == null) return;
 
 
 		inline function setSceneSize( w : Int, h : Int ) {
 		inline function setSceneSize( w : Int, h : Int ) {
 			if ( w != this.width || h != this.height ) {
 			if ( w != this.width || h != this.height ) {