Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix crash when closing last zed window (#8102)
Joseph T. Lyons92b2e5608b23
diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rsindex 4ac114331da..f30e5264f12 100644--- a/crates/gpui/src/app.rs+++ b/crates/gpui/src/app.rs@@ -1243,7 +1243,7 @@ impl Context for AppContext {.get_mut(handle.id).ok_or_else(|| anyhow!("window not found"))?.take()- .unwrap();+ .ok_or_else(|| anyhow!("window not found"))?;let root_view = window.root_view.clone().unwrap();let result = update(root_view, &mut WindowContext::new(cx, &mut window));