Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix polyline update and removal bookkeeping
Fixes CesiumGS#4983. PolylineCollection stores a list of polylines that are waiting to be updated in the next render pass. However, if a polyline is both updated _and_ removed in the same synchronous execution sequence, _and_ the polyline is near the end of the collection's internal `this._polylines` list, it's possible for the PolylineCollection to effectively read off the end of the array, causing an error "Batch Table instanceIndex out of range". This is resolved by ensuring that removing a polyline from the collection also removes it from the list of polylines waiting to be updated.
- Loading branch information