Skip to content

Commit

Permalink
fix(table::iter): add missing table unlock to .fini()
Browse files Browse the repository at this point in the history
  • Loading branch information
Indra-db committed Dec 22, 2024
1 parent db1b212 commit 2200640
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flecs_ecs/src/core/table/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,12 @@ where
/// });
/// ```
pub fn fini(self) {
if self.iter.flags & sys::EcsIterIsValid != 0 && !self.iter.table.is_null() {
unsafe {
sys::ecs_table_unlock(self.iter.world, self.iter.table);
};
}

unsafe {
sys::ecs_iter_fini(self.iter);
}
Expand Down

0 comments on commit 2200640

Please sign in to comment.