diff --git a/src/IronyModManager.Services/Registrations/GameRegistration.cs b/src/IronyModManager.Services/Registrations/GameRegistration.cs index 8bcaf1f1..5c66fb1e 100644 --- a/src/IronyModManager.Services/Registrations/GameRegistration.cs +++ b/src/IronyModManager.Services/Registrations/GameRegistration.cs @@ -5,7 +5,7 @@ // Created : 02-12-2020 // // Last Modified By : Mario -// Last Modified On : 06-25-2023 +// Last Modified On : 09-10-2023 // *********************************************************************** // // Mario @@ -143,7 +143,10 @@ private GameSettings GetExecutableSettings(IGameType game) if (!File.Exists(path) && game.GogAppId.HasValue) { basePath = GogDirectory.GetGameDirectory(game.GogAppId.GetValueOrDefault()); - path = Path.Combine(basePath, game.LauncherSettingsFileName); + if (!string.IsNullOrWhiteSpace(basePath)) + { + path = Path.Combine(basePath, game.LauncherSettingsFileName); + } } if (File.Exists(path)) { diff --git a/src/IronyModManager.Services/Registrations/GogDirectory.cs b/src/IronyModManager.Services/Registrations/GogDirectory.cs index 11958db4..b1f09b71 100644 --- a/src/IronyModManager.Services/Registrations/GogDirectory.cs +++ b/src/IronyModManager.Services/Registrations/GogDirectory.cs @@ -5,7 +5,7 @@ // Created : 07-15-2022 // // Last Modified By : Mario -// Last Modified On : 05-26-2023 +// Last Modified On : 09-10-2023 // *********************************************************************** // // Mario @@ -64,7 +64,7 @@ public static string GetGameDirectory(int? appId) var game = games.FirstOrDefault(p => p.Id == appId.GetValueOrDefault()); if (game != null) { - return game.Path; + return game.Path ?? string.Empty; } } return string.Empty;