diff --git a/HellionChat/Ui/ChatLogWindow.cs b/HellionChat/Ui/ChatLogWindow.cs index e2b1e6e..3fc7a00 100644 --- a/HellionChat/Ui/ChatLogWindow.cs +++ b/HellionChat/Ui/ChatLogWindow.cs @@ -90,6 +90,10 @@ public sealed class ChatLogWindow : Window private bool PlayedClosingSound = true; private bool DrewThisFrame; + // F7.1: one-shot guard so a recurring draw failure doesn't spam the + // notification stack frame-by-frame. Resets only on next plugin reload. + private bool _notifiedDrawFailure; + private long FrameTime; // set every frame internal long LastActivityTime = Environment.TickCount64; @@ -627,6 +631,19 @@ public sealed class ChatLogWindow : Window catch (Exception ex) { Plugin.Log.Error(ex, "Error drawing Chat Log window"); + if (!_notifiedDrawFailure) + { + Plugin.Notification.AddNotification( + new Dalamud.Interface.ImGuiNotification.Notification + { + Title = "Hellion Chat", + Content = "A drawing error occurred. Check /xllog for details.", + Type = Dalamud.Interface.ImGuiNotification.NotificationType.Warning, + InitialDuration = TimeSpan.FromSeconds(20), + } + ); + _notifiedDrawFailure = true; + } // Prevent recurring draw failures from constantly trying to grab // input focus, which breaks every other ImGui window. Activate = false;