Added null check to NexusDownloader:GetDownloaderState

This commit is contained in:
erri120 2019-11-09 15:57:35 +01:00 committed by Timothy Baldridge
parent 6c1177d8e1
commit 5b1ea3d448

View File

@ -19,7 +19,8 @@ namespace Wabbajack.Lib.Downloaders
if (general.modID != null && general.fileID != null && general.gameName != null)
{
var name = (string)general.gameName;
var game = GameRegistry.GetByMO2ArchiveName(name).Game;
var gameMeta = GameRegistry.GetByMO2ArchiveName(name);
var game = gameMeta != null ? GameRegistry.GetByMO2ArchiveName(name).Game : GameRegistry.GetByNexusName(name).Game;
var info = new NexusApiClient().GetModInfo(game, general.modID);
return new State
{