Browse Source

Merge pull request #1699 from nockawa/trackedNode

Engine: null check on _bindIndexBufferWithCache to make unindexed dra…
David Catuhe 8 years ago
parent
commit
52aacfc0c3
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/babylon.engine.ts

+ 3 - 0
src/babylon.engine.ts

@@ -1385,6 +1385,9 @@
         }
 
         private _bindIndexBufferWithCache(indexBuffer: WebGLBuffer): void {            
+            if (indexBuffer == null) {
+                return;
+            }
             if (this._cachedIndexBuffer !== indexBuffer) {
                 this._cachedIndexBuffer = indexBuffer;
                 this.bindIndexBuffer(indexBuffer);