Ver Fonte

Fixed `dispose()` error when called before init

RaenonX há 1 ano atrás
pai
commit
0e5d9a7162
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      spine-ts/spine-webgl/src/LoadingScreen.ts

+ 2 - 2
spine-ts/spine-webgl/src/LoadingScreen.ts

@@ -70,8 +70,8 @@ export class LoadingScreen implements Disposable {
 		}
 	}
 	dispose (): void {
-		this.logo.dispose();
-		this.spinner.dispose();
+		this.logo?.dispose();
+		this.spinner?.dispose();
 	}
 
 	draw (complete = false) {