Browse Source

Fix: Crash if you have a camera with multiple postprocesses.

Pablo Martin 8 years ago
parent
commit
1291c4377e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/Cameras/babylon.camera.ts

+ 2 - 1
src/Cameras/babylon.camera.ts

@@ -527,7 +527,8 @@
             }
 
             // Postprocesses
-            for (var i = 0; i < this._postProcesses.length; ++i) {
+            var i = this._postProcesses.length;
+            while (--i >= 0) {
                 this._postProcesses[i].dispose(this);
             }