diff --git a/Tranga/Jobs/JobBoss.cs b/Tranga/Jobs/JobBoss.cs index 4f2414c..06937da 100644 --- a/Tranga/Jobs/JobBoss.cs +++ b/Tranga/Jobs/JobBoss.cs @@ -62,8 +62,9 @@ public class JobBoss : GlobalBase public void RemoveJobs(IEnumerable jobsToRemove) { - Log($"Removing {jobsToRemove.Count()} jobs."); - foreach (Job? job in jobsToRemove) + List toRemove = jobsToRemove.ToList(); //Prevent multiple enumeration + Log($"Removing {toRemove.Count()} jobs."); + foreach (Job? job in toRemove) if(job is not null) RemoveJob(job); }