Skip to content

Commit

Permalink
wrap world::module in defer_begin and defer_end
Browse files Browse the repository at this point in the history
this is to counter a bug temporarily, posted on discord https://discord.com/channels/633826290415435777/1303253280864079882
  • Loading branch information
Indra-db committed Nov 5, 2024
1 parent 98b53fb commit 6a719cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flecs_ecs/src/addons/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ impl World {
/// * [`World::import()`]
/// * C++ API: `world::module`
pub fn module<M: ComponentId>(&self, name: &str) -> EntityView {
self.defer_begin();
let comp = self.component::<M>();
let id = comp.id();

Expand Down Expand Up @@ -187,6 +188,7 @@ impl World {
}
}
}
self.defer_end();

//self.set_scope_id(id);
EntityView::new_from(self, *id)
Expand Down

0 comments on commit 6a719cd

Please sign in to comment.