Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix windows crash handler (#42039)

Julia Ryanfb2c2c55dc7f
diff --git a/crates/crashes/src/crashes.rs b/crates/crashes/src/crashes.rs
index 3a2c9378535..560ca5a009d 100644
--- a/crates/crashes/src/crashes.rs
+++ b/crates/crashes/src/crashes.rs
@@ -265,9 +265,10 @@ impl minidumper::ServerHandler for CrashServer {
3 => {
let gpu_specs: system_specs::GpuSpecs =
bincode::deserialize(&buffer).expect("gpu specs");
- self.active_gpu
- .set(gpu_specs)
- .expect("already set active gpu");
+ // we ignore the case where it was already set because this message is sent
+ // on each new window. in theory all zed windows should be using the same
+ // GPU so this is fine.
+ self.active_gpu.set(gpu_specs).ok();
}
_ => {
panic!("invalid message kind");