Procházet zdrojové kódy

check if not null before calling dispose

Trevor Baron před 7 roky
rodič
revize
d411e4e02e
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      src/Particles/babylon.particleSystem.ts

+ 1 - 1
src/Particles/babylon.particleSystem.ts

@@ -1771,7 +1771,7 @@
 
             this._removeFromRoot();
 
-            if (this._disposeEmitterOnDispose && !(<AbstractMesh>this.emitter).isDisposed) {
+            if (this._disposeEmitterOnDispose && this.emitter && !(this.emitter as AbstractMesh).isDisposed === false) {
                 (<AbstractMesh>this.emitter).dispose();
             }