Skip to content

Commit

Permalink
[fix] (lua) crash when calling commit_changes on certain components
Browse files Browse the repository at this point in the history
  • Loading branch information
begla committed Mar 10, 2024
1 parent a9650fe commit ba898a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion iolite_plugins/lua_plugin/init_state.cpp
Expand Up @@ -2498,7 +2498,8 @@ void script_init_state(sol::state& s)
t_["get_type_id"] = i_->base.get_type_id; \
t_["create"] = i_->base.create; \
t_["destroy"] = i_->base.destroy; \
t_["commit_changes"] = i_->base.commit_changes; \
t_["commit_changes"] = [](io_ref_t component) { if (i_->base.commit_changes) \
i_->base.commit_changes(component); }; \
t_["get_num_active_components"] = i_->base.get_num_active_components; \
t_["get_component_for_entity"] = i_->base.get_component_for_entity; \
t_["is_alive"] = i_->base.is_alive; \
Expand Down

0 comments on commit ba898a0

Please sign in to comment.