Skip to content

Commit 9601a75

Browse files
authored
fix: check for created callback nullptr (#97)
1 parent 5471f71 commit 9601a75

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ecsact/entt/wrapper/core.hh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ inline auto _trigger_create_entity_events(
216216
) -> void {
217217
using ecsact::entt::detail::created_entity;
218218

219+
if(!events_collector.has_entity_created_callback()) {
220+
return;
221+
}
222+
219223
auto& reg = ecsact::entt::get_registry(registry_id);
220224

221225
::entt::basic_view created_view{

0 commit comments

Comments
 (0)