From 954409d3a2704cbae5e8aedee0f48ab7e1439b36 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 24 Mar 2026 17:03:06 -0700 Subject: [PATCH] Fix crash when moving panels (#52366) Fixes a crash introduced by removing some defensive code in https://github.com/zed-industries/zed/pull/52276 Release Notes: - N/A Co-authored-by: Mikayla Maki --- crates/workspace/src/dock.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/workspace/src/dock.rs b/crates/workspace/src/dock.rs index 96323ef4e2ed0b826144ce49a8fa261f482ac1bc..7e86a5a8a3314dd20c3bd0320a3d2a3657496ce3 100644 --- a/crates/workspace/src/dock.rs +++ b/crates/workspace/src/dock.rs @@ -541,7 +541,10 @@ impl Dock { PanelSizeState::default() }; - this.remove_panel(&panel, window, cx); + if !this.remove_panel(&panel, window, cx) { + // Panel was already moved from this dock + return; + } new_dock.update(cx, |new_dock, cx| { let index =