diff --git a/src/plugin.rs b/src/plugin.rs index e5f1ad5..9c2c5cf 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -181,7 +181,9 @@ fn remove( let Ok(&WithBar(bar_entity, _)) = parent_query.get(entity) else { return; }; - + if commands.get_entity(bar_entity).is_none(){ + return; + } commands.entity(bar_entity).despawn_recursive() }); }