Fix possible NullReference

This commit is contained in:
Mira 2022-06-26 12:42:51 +02:00
parent 30e8f6070a
commit e274b7d831
Signed by untrusted user who does not match committer: Xorog
GPG key ID: 983798ED9C3E7C36

View file

@ -323,6 +323,9 @@ public static class UniversalExtensions
/// <returns>A list of all registered tasks</returns> /// <returns>A list of all registered tasks</returns>
public static List<KeyValuePair<string, taskInfo>>? GetScheduleTasks() public static List<KeyValuePair<string, taskInfo>>? GetScheduleTasks()
{ {
if (registeredScheduledTasks is null)
registeredScheduledTasks = new();
return registeredScheduledTasks.ToList(); return registeredScheduledTasks.ToList();
} }