aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xazalea-client/src/player.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-client/src/player.rs b/azalea-client/src/player.rs
index 3680e2d0..8bccedc8 100755
--- a/azalea-client/src/player.rs
+++ b/azalea-client/src/player.rs
@@ -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()));
+ }
}
}
}