diff --git a/Source/ProviderPawnKinds.cs b/Source/ProviderPawnKinds.cs index 6b6053b..445fd65 100644 --- a/Source/ProviderPawnKinds.cs +++ b/Source/ProviderPawnKinds.cs @@ -85,7 +85,7 @@ public ProviderPawnKinds() { foreach (var pair in uniquePawnKindsByFaction) { var faction = pair.Key; var pawnKinds = new List(pair.Value); - Logger.Debug("Sorting unique pawns kinds by faction: " + faction?.defName); + //Logger.Debug("Sorting unique pawns kinds by faction: " + faction?.defName); pawnKinds.Sort((a, b) => { return string.Compare(a.LabelCap.ToString(), b.LabelCap.ToString()); }); @@ -98,7 +98,7 @@ public ProviderPawnKinds() { } pawnKindsByFaction.Sort((a, b) => { - return string.Compare(a.Faction.LabelCap.ToString(), b.Faction.LabelCap.ToString()); + return string.Compare(a.Faction?.LabelCap.ToString(), b.Faction?.LabelCap.ToString()); }); otherPawnKinds.Sort((a, b) => { return string.Compare(a.LabelCap.ToString(), b.LabelCap.ToString());