Przeglądaj źródła

Fixed `dispose()` error when called before init

RaenonX 1 rok temu
rodzic
commit
0e5d9a7162
1 zmienionych plików z 2 dodań i 2 usunięć
  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) {