Просмотр исходного кода

Fixed `dispose()` error when called before init

RaenonX 1 год назад
Родитель
Сommit
0e5d9a7162
1 измененных файлов с 2 добавлено и 2 удалено
  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 {
 	dispose (): void {
-		this.logo.dispose();
-		this.spinner.dispose();
+		this.logo?.dispose();
+		this.spinner?.dispose();
 	}
 	}
 
 
 	draw (complete = false) {
 	draw (complete = false) {