diff --git a/Tranga/TrangaSettings.cs b/Tranga/TrangaSettings.cs index 4295d2d..02de48d 100644 --- a/Tranga/TrangaSettings.cs +++ b/Tranga/TrangaSettings.cs @@ -16,15 +16,15 @@ public class TrangaSettings public HashSet libraryManagers { get; } public HashSet notificationManagers { get; } - public TrangaSettings(string downloadLocation, string workingDirectory, HashSet libraryManagers, - HashSet notificationManagers) + public TrangaSettings(string downloadLocation, string workingDirectory, HashSet? libraryManagers, + HashSet? notificationManagers) { if (downloadLocation.Length < 1 || workingDirectory.Length < 1) throw new ArgumentException("Download-location and working-directory paths can not be empty!"); this.workingDirectory = workingDirectory; this.downloadLocation = downloadLocation; - this.libraryManagers = libraryManagers; - this.notificationManagers = notificationManagers; + this.libraryManagers = libraryManagers??new(); + this.notificationManagers = notificationManagers??new(); } public static TrangaSettings LoadSettings(string importFilePath, Logger? logger)