Add missing block.copy() (#10496)

https://crates.io/crates/block implies this is necessary, and we're
still seeing segfaults in this method, so...

Release Notes:

- Fixed a panic when installing the CLI / registering for the zed://
protocol
This commit is contained in:
Conrad Irwin 2024-04-12 14:50:12 -06:00 committed by GitHub
parent ba9c5929af
commit e64ecdc9ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -570,6 +570,7 @@ impl Platform for MacPlatform {
let _ = done_tx.send(result);
}
});
let block = block.copy();
let _: () = msg_send![workspace, setDefaultApplicationAtURL: app toOpenURLsWithScheme: scheme completionHandler: block];
}