From 0e5d9a71622190dcf43bc6a334aefabf42f4616c Mon Sep 17 00:00:00 2001 From: RaenonX Date: Mon, 9 Sep 2024 17:14:09 +0800 Subject: [PATCH] Fixed `dispose()` error when called before init --- spine-ts/spine-webgl/src/LoadingScreen.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spine-ts/spine-webgl/src/LoadingScreen.ts b/spine-ts/spine-webgl/src/LoadingScreen.ts index adca8cde2..2f5e4f9f8 100644 --- a/spine-ts/spine-webgl/src/LoadingScreen.ts +++ b/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) {