diff --git a/crates/ui_core/src/combo_box.rs b/crates/ui_core/src/combo_box.rs index 4be33d51..7aae1d71 100644 --- a/crates/ui_core/src/combo_box.rs +++ b/crates/ui_core/src/combo_box.rs @@ -277,7 +277,9 @@ fn update_comboboxen( On::::new(close_ui_silent), On::::new(move |mut commands: Commands| { debug!("selected {ix:?}"); - commands.entity(popup.root).despawn_recursive(); + if let Some(commands) = commands.get_entity(popup.root) { + commands.despawn_recursive(); + } let Some(mut commands) = commands.get_entity(ent) else { warn!("no combo"); return;