diff --git a/src/OpenDirectoryDownloader/DirectoryParser.cs b/src/OpenDirectoryDownloader/DirectoryParser.cs index 03a18c35..35e47d7a 100644 --- a/src/OpenDirectoryDownloader/DirectoryParser.cs +++ b/src/OpenDirectoryDownloader/DirectoryParser.cs @@ -165,7 +165,7 @@ public static async Task ParseHtml(WebDirectory webDirectory, stri } } - if (OpenDirectoryIndexer.Session.Parameters.ContainsKey(Constants.GoogleDriveIndexType)) + if (OpenDirectoryIndexer.Session is not null && OpenDirectoryIndexer.Session.Parameters.ContainsKey(Constants.GoogleDriveIndexType)) { string googleDriveIndexType = OpenDirectoryIndexer.Session.Parameters[Constants.GoogleDriveIndexType];