From 2b7f3c2e8b208f6dc980d5b3cf1449c8e069c49c Mon Sep 17 00:00:00 2001 From: Tig Date: Sat, 26 Oct 2024 07:29:30 -0700 Subject: [PATCH] Fixed timeout bug --- Terminal.Gui/Application/Application.Run.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Terminal.Gui/Application/Application.Run.cs b/Terminal.Gui/Application/Application.Run.cs index 500a20fc0..93b342628 100644 --- a/Terminal.Gui/Application/Application.Run.cs +++ b/Terminal.Gui/Application/Application.Run.cs @@ -454,7 +454,10 @@ public static partial class Application // Run (Begin, Run, End, Stop) /// reset, repeating the invocation. If it returns false, the timeout will stop and be removed. The returned value is a /// token that can be used to stop the timeout by calling . /// - public static object AddTimeout (TimeSpan time, Func callback) { return MainLoop!.AddTimeout (time, callback); } + public static object? AddTimeout (TimeSpan time, Func callback) + { + return MainLoop?.AddTimeout (time, callback) ?? null; + } /// Removes a previously scheduled timeout /// The token parameter is the value returned by .