Browse Source

Merge pull request #1282 from wyklion/master

If not use extra(no DebugLayer) it will be error.
David Catuhe 9 years ago
parent
commit
eb434d93be
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/babylon.engine.ts

+ 1 - 1
src/babylon.engine.ts

@@ -838,7 +838,7 @@
 
 
             for (var index = 0; index < this.scenes.length; index++) {
             for (var index = 0; index < this.scenes.length; index++) {
                 var scene = this.scenes[index];
                 var scene = this.scenes[index];
-                if (scene.debugLayer.isVisible()) {
+                if (DebugLayer && scene.debugLayer.isVisible()) {
                     scene.debugLayer._syncPositions();
                     scene.debugLayer._syncPositions();
                 }
                 }
             }
             }