Преглед изворни кода

Engine: null check on _bindIndexBufferWithCache to make unindexed draws working again

nockawa пре 8 година
родитељ
комит
a56f4a57cd
1 измењених фајлова са 3 додато и 0 уклоњено
  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);