From c32126f2864767a7be7472844c0b2839203f0b5f Mon Sep 17 00:00:00 2001 From: Pat Hartl Date: Wed, 15 Mar 2023 17:44:01 -0500 Subject: [PATCH] Throw exception when installing if game has no actions defined --- LANCommander.Playnite.Extension/LANCommanderLibraryPlugin.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LANCommander.Playnite.Extension/LANCommanderLibraryPlugin.cs b/LANCommander.Playnite.Extension/LANCommanderLibraryPlugin.cs index 14eec28..226d954 100644 --- a/LANCommander.Playnite.Extension/LANCommanderLibraryPlugin.cs +++ b/LANCommander.Playnite.Extension/LANCommanderLibraryPlugin.cs @@ -334,6 +334,9 @@ namespace LANCommander.PlaynitePlugin game.Icon = $"{Settings.ServerAddress}{manifest.Icon}"; + if (manifest.Actions == null) + throw new Exception("The game has no actions defined."); + foreach (var action in manifest.Actions.OrderBy(a => a.SortOrder)) { bool isFirstAction = !manifest.Actions.Any(a => a.IsPrimaryAction) && manifest.Actions.First().Name == action.Name;