mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-25 16:24:24 +00:00
Fix a bounds check in remove_abandoned (#5024)
This commit is contained in:
parent
37755b6985
commit
4400a58470
@ -88,7 +88,7 @@ impl<A: HalApi, Id: TypedId, T: Resource<Id>> ResourceTracker<Id, T>
|
||||
fn remove_abandoned(&mut self, id: Id) -> bool {
|
||||
let index = id.unzip().0 as usize;
|
||||
|
||||
if index > self.metadata.size() {
|
||||
if index >= self.metadata.size() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user