From 92b2e5608b23ab620f7de58b6ff90b0893e11835 Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Wed, 21 Feb 2024 00:48:42 -0500 Subject: [PATCH] Fix crash when closing last zed window (#8102) Fixes: #8100 Release Notes: - N/A --- crates/gpui/src/app.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui/src/app.rs b/crates/gpui/src/app.rs index 4ac114331dadee9a0ee957d5e7e8acfb1b75e37e..f30e5264f129762f84303a18b32e4b42625fbd4b 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));