diff --git a/src/BizHawk.Client.Common/display/InputDisplayGenerator.cs b/src/BizHawk.Client.Common/display/InputDisplayGenerator.cs index e347916bf0..ed53992d24 100644 --- a/src/BizHawk.Client.Common/display/InputDisplayGenerator.cs +++ b/src/BizHawk.Client.Common/display/InputDisplayGenerator.cs @@ -16,10 +16,13 @@ public static string Generate(IController source) throw new InvalidOperationException("Can't generate input display string with empty mnemonics cache"); var sb = new StringBuilder(); - var controls = source.Definition.ControlsOrdered.ToList(); - // index 0 is for controls that don't belong to any indexed player - controls.Add(controls[0]); - controls.RemoveAt(0); + var controls = source.Definition.ControlsOrdered.ToList(); + // index 0 is for controls that don't belong to any indexed player + if (controls.ElementAtOrDefault(0) != null) + { + controls.Add(controls[0]); + controls.RemoveAt(0); + } foreach ((string buttonName, AxisSpec? axisSpec) in controls.SelectMany(x => x)) {