Skip to content

Commit 14e9fbb

Browse files
authored
Fix NRE on combined use of base game and modded SAs
1 parent fcc2efe commit 14e9fbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Patches/Card_AttachAbilities_NewSpecialAbilities.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public static bool Prefix(CardInfo info, Card __instance)
2424
foreach (var type in info.SpecialAbilities
2525
.Select(specialTriggeredAbility => NewSpecialAbility.specialAbilities
2626
.Find(x => x.specialTriggeredAbility == specialTriggeredAbility))
27+
.Where(x => x is not null)
2728
.Select(newAbility => newAbility.abilityBehaviour))
2829
{
2930
Plugin.Log.LogDebug($"-> Special Card Behaviour Type is [{type}]");
@@ -39,4 +40,4 @@ public static bool Prefix(CardInfo info, Card __instance)
3940
return true;
4041
}
4142
}
42-
}
43+
}

0 commit comments

Comments
 (0)