Sfoglia il codice sorgente

Fix bug when the inspector is removed from the dispose tool in the inspector itself

Temechon 8 anni fa
parent
commit
4a6c9feaef
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. 5 1
      src/Debug/babylon.debugLayer.ts

+ 5 - 1
src/Debug/babylon.debugLayer.ts

@@ -46,7 +46,11 @@ module BABYLON {
 
         public hide() {
             if (this._inspector) {
-                this._inspector.dispose();
+                try {
+                    this._inspector.dispose();
+                } catch (e) {
+                    // If the inspector has been removed directly from the inspector tool
+                }
                 this._inspector = null;
             }
         }