Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix segfault in "install:cli" when app is not yet installed (#9427)
Conrad Irwinf1d98dc7486f
diff --git a/crates/gpui/src/platform/mac/platform.rs b/crates/gpui/src/platform/mac/platform.rsindex 25346f7b5b8..7d76b1d27a2 100644--- a/crates/gpui/src/platform/mac/platform.rs+++ b/crates/gpui/src/platform/mac/platform.rs@@ -553,6 +553,11 @@ impl Platform for MacPlatform {let workspace: id = msg_send![class!(NSWorkspace), sharedWorkspace];let scheme: id = ns_string(scheme);let app: id = msg_send![workspace, URLForApplicationWithBundleIdentifier: bundle_id];+ if app == nil {+ return Task::ready(Err(anyhow!(+ "Cannot register URL scheme until app is installed"+ )));+ }let done_tx = Cell::new(Some(done_tx));let block = ConcreteBlock::new(move |error: id| {let result = if error == nil {