From 3d88c7063a45e8b600cca3cdf715ee04e68e5761 Mon Sep 17 00:00:00 2001 From: Finn Evers Date: Mon, 9 Feb 2026 12:03:57 +0100 Subject: [PATCH] title_bar: Fix `ToggleProjects` panic (#48775) Another follow-up to the multi workspace PR - [X] Code Reviewed - [X] Manual QA Release Notes: - N/A --- crates/title_bar/src/title_bar.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/title_bar/src/title_bar.rs b/crates/title_bar/src/title_bar.rs index 67f30a840126dd202ccd146adf384c88b055cd15..38c2b028a9a4b161ef4397a29b510390f4dd58e9 100644 --- a/crates/title_bar/src/title_bar.rs +++ b/crates/title_bar/src/title_bar.rs @@ -84,8 +84,10 @@ pub fn init(cx: &mut App) { .titlebar_item() .and_then(|item| item.downcast::().ok()) { - titlebar.update(cx, |titlebar, cx| { - titlebar.show_project_dropdown(window, cx); + window.defer(cx, move |window, cx| { + titlebar.update(cx, |titlebar, cx| { + titlebar.show_project_dropdown(window, cx); + }) }); } });