Explorar o código

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

nockawa %!s(int64=8) %!d(string=hai) anos
pai
achega
a56f4a57cd
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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);