Only process diagnostics if corresponding project is alive

Part of https://github.com/zed-industries/zed/pull/3128 that is possible
to apply now.
This commit is contained in:
Kirill Bulatov 2023-10-31 10:40:49 +02:00
parent bcf3bac168
commit c98a811c0b

View file

@ -2986,8 +2986,8 @@ impl Project {
let this = this.clone();
move |mut params, mut cx| {
let adapter = adapter.clone();
adapter.process_diagnostics(&mut params);
if let Some(this) = this.upgrade() {
adapter.process_diagnostics(&mut params);
this.update(&mut cx, |this, cx| {
this.update_diagnostics(
server_id,