Fix possible NPE

This commit is contained in:
Timothy Baldridge 2020-05-13 08:06:18 -06:00
parent aab0a7eda6
commit 0207c7ac07

View File

@ -88,7 +88,7 @@ namespace Wabbajack.Lib
var otherProfilesPath = MO2ProfileDir.Combine("otherprofiles.txt");
SelectedProfiles = new HashSet<string>();
if (otherProfilesPath.Exists) SelectedProfiles = (await otherProfilesPath.ReadAllLinesAsync()).ToHashSet();
SelectedProfiles.Add(MO2Profile);
SelectedProfiles.Add(MO2Profile!);
Info("Using Profiles: " + string.Join(", ", SelectedProfiles.OrderBy(p => p)));
@ -322,7 +322,7 @@ namespace Wabbajack.Lib
Archives = SelectedArchives.ToList(),
ModManager = ModManager.MO2,
Directives = InstallDirectives,
Name = ModListName ?? MO2Profile,
Name = ModListName ?? MO2Profile!,
Author = ModListAuthor ?? "",
Description = ModListDescription ?? "",
Readme = ModlistReadme ?? "",