Nicolas Cannasse 4 年之前
父节点
当前提交
efc2dbc89d
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      hxd/App.hx

+ 3 - 3
hxd/App.hx

@@ -151,9 +151,9 @@ class App implements h3d.IDrawable {
 		engine.onResized = staticHandler;
 		engine.onContextLost = staticHandler;
 		isDisposed = true;
-		s2d.dispose();
-		s3d.dispose();
-		sevents.dispose();
+		if( s2d != null ) s2d.dispose();
+		if( s3d != null ) s3d.dispose();
+		if( sevents != null ) sevents.dispose();
 	}
 
 	/**