diff --git a/ARKBreedingStats/uiControls/NamePatterns.cs b/ARKBreedingStats/uiControls/NamePatterns.cs index 8815fc6f..5d79acf7 100644 --- a/ARKBreedingStats/uiControls/NamePatterns.cs +++ b/ARKBreedingStats/uiControls/NamePatterns.cs @@ -336,7 +336,7 @@ public static Dictionary CreateTokenDictionary(Creature creature string firstWordOfOldest = ""; if (speciesCreatures.Any()) { - firstWordOfOldest = speciesCreatures.Where(c => c.addedToLibrary != null && !c.flags.HasFlag(CreatureFlags.Placeholder)).OrderBy(c => c.addedToLibrary).First().name; + firstWordOfOldest = speciesCreatures.Where(c => c.addedToLibrary != null && !c.flags.HasFlag(CreatureFlags.Placeholder)).OrderBy(c => c.addedToLibrary).FirstOrDefault()?.name; if (!string.IsNullOrEmpty(firstWordOfOldest) && firstWordOfOldest.Contains(" ")) { firstWordOfOldest = firstWordOfOldest.Substring(0, firstWordOfOldest.IndexOf(" "));