Null fix for checking required files when loading steam games

This commit is contained in:
Justin Swanson 2020-01-03 20:27:13 -06:00
parent 907b020db5
commit f9f9646cc8

View File

@ -159,11 +159,11 @@ namespace Wabbajack.Common.StoreHandlers
if (!valid) return;
var gameMeta = GameRegistry.Games.Values.FirstOrDefault(g =>
g.SteamIDs.Contains(game.ID)
&&
g.RequiredFiles.TrueForAll(file =>
File.Exists(Path.Combine(game.Path, file))));
var gameMeta = GameRegistry.Games.Values.FirstOrDefault(g =>
{
return g.SteamIDs.Contains(game.ID)
&& (g.RequiredFiles?.TrueForAll(file => File.Exists(Path.Combine(game.Path, file))) ?? true);
});
if (gameMeta == null)
return;