Преглед на файлове

Defensive coding just in case

sebavan преди 5 години
родител
ревизия
58fc8aae6c
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      src/Engines/thinEngine.ts

+ 4 - 0
src/Engines/thinEngine.ts

@@ -1823,6 +1823,10 @@ export class ThinEngine {
                 ai.index = this._currentEffect!.getAttributeLocationByName(ai.attributeName);
             }
 
+            if (ai.index < 0) {
+                continue;
+            }
+
             if (!this._vertexAttribArraysEnabled[ai.index]) {
                 this._gl.enableVertexAttribArray(ai.index);
                 this._vertexAttribArraysEnabled[ai.index] = true;