Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
linux/wayland: prevent possible panic (#8824)
Rom Grkc91969d828d7
diff --git a/crates/gpui/src/platform/linux/wayland/client.rs b/crates/gpui/src/platform/linux/wayland/client.rsindex 0bbd716e066..8ac18b78c36 100644--- a/crates/gpui/src/platform/linux/wayland/client.rs+++ b/crates/gpui/src/platform/linux/wayland/client.rs@@ -558,11 +558,12 @@ impl Dispatch<wl_keyboard::WlKeyboard, ()> for WaylandClientState {return TimeoutAction::Drop;}- state_- .keyboard_focused_window- .as_ref()- .unwrap()- .handle_input(input.clone());+ let focused_window =+ state_.keyboard_focused_window.as_ref().unwrap().clone();++ drop(state_);++ focused_window.handle_input(input.clone());TimeoutAction::ToDuration(Duration::from_secs(1) / rate)})