check entity for retroactively_add_game_profile_component

This commit is contained in:
mat 2023-02-23 18:46:41 -06:00
parent 54a2eb9c95
commit 21e3f73c23

View file

@ -36,9 +36,9 @@ pub fn retroactively_add_game_profile_component(
) {
for event in events.iter() {
if let Some(entity) = entity_infos.get_entity_by_uuid(&event.info.uuid) {
commands
.entity(entity)
.insert(GameProfileComponent(event.info.profile.clone()));
if let Some(mut entity_commands) = commands.get_entity(entity) {
entity_commands.insert(GameProfileComponent(event.info.profile.clone()));
}
}
}
}