Преглед изворни кода

Fixed `dispose()` error when called before init

RaenonX пре 1 година
родитељ
комит
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 {
-		this.logo.dispose();
-		this.spinner.dispose();
+		this.logo?.dispose();
+		this.spinner?.dispose();
 	}
 
 	draw (complete = false) {