mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fixed LoadAllGames failing when no GOGIDs List exist
This commit is contained in:
parent
03251804c1
commit
e845f767e6
@ -54,7 +54,7 @@ namespace Wabbajack.Common
|
|||||||
public void LoadAllGames()
|
public void LoadAllGames()
|
||||||
{
|
{
|
||||||
Games = new HashSet<GOGGame>();
|
Games = new HashSet<GOGGame>();
|
||||||
if (this.GOGKey == null) return;
|
if (GOGKey == null) return;
|
||||||
string[] keys = GOGKey.GetSubKeyNames();
|
string[] keys = GOGKey.GetSubKeyNames();
|
||||||
foreach (var key in keys)
|
foreach (var key in keys)
|
||||||
{
|
{
|
||||||
@ -66,7 +66,7 @@ namespace Wabbajack.Common
|
|||||||
};
|
};
|
||||||
|
|
||||||
game.Game = GameRegistry.Games.Values
|
game.Game = GameRegistry.Games.Values
|
||||||
.FirstOrDefault(g => g.GOGIDs.Contains(game.GameID))?.Game;
|
.FirstOrDefault(g => g.GOGIDs != null && g.GOGIDs.Contains(game.GameID))?.Game;
|
||||||
|
|
||||||
Games.Add(game);
|
Games.Add(game);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user