Skip to content

Commit

Permalink
Fix infinite loop in ShaderProgramPool._recursiveDestroy (#1968)
Browse files Browse the repository at this point in the history
* fix: shaderprogrampool _recursiveDestroy
  • Loading branch information
Sway007 authored Jan 12, 2024
1 parent a5fea42 commit b78e56d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/core/src/shader/ShaderProgramPool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ export class ShaderProgramPool {
}
return;
}
++hierarchy;
for (let k in cacheMap) {
this._recursiveDestroy(++hierarchy, <Tree<ShaderProgram>>cacheMap[k]);
this._recursiveDestroy(hierarchy, <Tree<ShaderProgram>>cacheMap[k]);
}
}

Expand Down

0 comments on commit b78e56d

Please sign in to comment.