diff --git a/iced_layershell/src/multi_window.rs b/iced_layershell/src/multi_window.rs index 19fa180..739d062 100644 --- a/iced_layershell/src/multi_window.rs +++ b/iced_layershell/src/multi_window.rs @@ -1031,7 +1031,11 @@ pub(crate) fn run_action( } let option_id = if let LayershellCustomActionsWithInfo::RemoveWindow(id) = action.1 { - window_manager.get_layer_id(id) + let option_id = window_manager.get_layer_id(id); + if option_id.is_none() { + return; + } + option_id } else { None };