unhandled exceptions when calling Draw() must be fatal

This commit is contained in:
goat 2024-12-26 13:29:54 +01:00
parent b02194ca6a
commit 1d9116f0a0

View file

@ -1141,8 +1141,19 @@ internal partial class InterfaceManager : IInternalDisposableService
WindowSystem.FocusedWindowSystemNamespace = string.Empty;
if (this.IsDispatchingEvents)
{
try
{
this.Draw?.Invoke();
}
catch (Exception ex)
{
Log.Error(ex, "Error when invoking global Draw");
// We should always handle this in the callbacks.
Util.Fatal("An internal error occurred while drawing the Dalamud UI and the game must close.\nPlease report this error.", "Dalamud");
}
Service<NotificationManager>.GetNullable()?.Draw();
}
}