diff --git a/crates/gpui/src/window.rs b/crates/gpui/src/window.rs index 8be96c418f49262db6a57b6ca5ad0f30424d36c9..55f8ee45a0ffb1bcdd400f1881716da58905616a 100644 --- a/crates/gpui/src/window.rs +++ b/crates/gpui/src/window.rs @@ -1185,9 +1185,12 @@ impl Window { let next_frame_callbacks = next_frame_callbacks.clone(); let input_rate_tracker = input_rate_tracker.clone(); move |request_frame_options| { - let thermal_state = cx.update(|cx| cx.thermal_state()); + let thermal_state = handle + .update(&mut cx, |_, _, cx| cx.thermal_state()) + .log_err(); - if thermal_state == ThermalState::Serious || thermal_state == ThermalState::Critical + if thermal_state == Some(ThermalState::Serious) + || thermal_state == Some(ThermalState::Critical) { let now = Instant::now(); let last_frame_time = last_frame_time.replace(Some(now));