From a9e70ce2afb16ec1b1debc8905aa6e17a1e568fd Mon Sep 17 00:00:00 2001 From: Jon Kazama Date: Fri, 29 May 2026 13:29:29 +0200 Subject: [PATCH] fix(popout): guard against mid-frame unbind when closing from the header --- HellionChat/Ui/Windows/ChannelPopoutWindow.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/HellionChat/Ui/Windows/ChannelPopoutWindow.cs b/HellionChat/Ui/Windows/ChannelPopoutWindow.cs index 337f73b..0a37d21 100644 --- a/HellionChat/Ui/Windows/ChannelPopoutWindow.cs +++ b/HellionChat/Ui/Windows/ChannelPopoutWindow.cs @@ -82,6 +82,12 @@ internal sealed class ChannelPopoutWindow : Window DrawHeader(Bound); + // The header close button can unbind us mid-frame (CloseRequested -> + // pool.TryClose -> Unbind nulls Bound). Re-check before the body so we + // never hand a null tab to MessageList/InputBar in this same Draw call. + if (Bound is null) + return; + var inputHeight = InputBar.Height; using ( var body = ImRaii.Child(