diff --git a/GameLib.Plugin/GameLib.Plugin.Gog/GogGameFactory.cs b/GameLib.Plugin/GameLib.Plugin.Gog/GogGameFactory.cs index e9c8049..3538d0e 100644 --- a/GameLib.Plugin/GameLib.Plugin.Gog/GogGameFactory.cs +++ b/GameLib.Plugin/GameLib.Plugin.Gog/GogGameFactory.cs @@ -99,7 +99,7 @@ private static GogGame AddExecutables(ILauncher launcher, GogGame game) return null; } - game.InstallDir = Path.GetDirectoryName(game.Executable) ?? string.Empty; + game.InstallDir = string.IsNullOrEmpty(game.Executable) ? string.Empty : Path.GetDirectoryName(game.Executable) ?? string.Empty; game.LaunchString = $"\"{launcher.Executable}\" /command=runGame /gameId={game.Id}"; if (!string.IsNullOrEmpty(game.WorkingDir)) {