Fix windows crash handler (#42039)

Julia Ryan created

Closes #41471

We were killing the crash handler when it received a second copy of any
of the messages, but this GPU specs one is sent on each new window
rather than once at startup. We could gate the sending to only happen
once, but it's simpler to just allow multiple gpu specs messages.

Release Notes:

- N/A

Change summary

crates/crashes/src/crashes.rs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Detailed changes

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");