diff --git a/src/Spectre.Console/Widgets/Exceptions/ExceptionFormatter.cs b/src/Spectre.Console/Widgets/Exceptions/ExceptionFormatter.cs index 1d749a4..97acddf 100644 --- a/src/Spectre.Console/Widgets/Exceptions/ExceptionFormatter.cs +++ b/src/Spectre.Console/Widgets/Exceptions/ExceptionFormatter.cs @@ -221,9 +221,9 @@ internal static class ExceptionFormatter return true; } - private static IEnumerable FilterStackFrames(this IEnumerable frames) + private static IEnumerable FilterStackFrames(this IEnumerable? frames) { - var allFrames = frames.ToArray(); + var allFrames = frames?.ToArray() ?? Array.Empty(); var numberOfFrames = allFrames.Length; for (var i = 0; i < numberOfFrames; i++)