ソースを参照

check for null for meshes before disposing

Trevor Baron 7 年 前
コミット
b887655144
1 ファイル変更7 行追加2 行削除
  1. 7 2
      src/Cameras/VR/babylon.vrExperienceHelper.ts

+ 7 - 2
src/Cameras/VR/babylon.vrExperienceHelper.ts

@@ -1386,8 +1386,13 @@ module BABYLON {
                 this._deviceOrientationCamera.dispose();
             }
 
-            this._gazeTracker.dispose();
-            this._teleportationTarget.dispose();
+            if(this._gazeTracker){
+                this._gazeTracker.dispose();
+            }
+            
+            if(this._teleportationTarget){
+                this._teleportationTarget.dispose();
+            }
 
             this._floorMeshesCollection = [];