mirror of
https://gitgud.io/c0ffeeeeeeee/rimworld-animations.git
synced 2024-08-15 00:43:45 +00:00
null ref check in cache clearing
This commit is contained in:
parent
dd82340545
commit
ed2a6fd7ab
2 changed files with 1 additions and 1 deletions
Binary file not shown.
|
@ -16,7 +16,7 @@ namespace Rimworld_Animations
|
|||
{
|
||||
static bool ClearCache(Pawn pawn)
|
||||
{
|
||||
return pawn.IsInvisible() || pawn.TryGetComp<CompBodyAnimator>().isAnimating;
|
||||
return pawn.IsInvisible() || (pawn.TryGetComp<CompBodyAnimator>() != null && pawn.TryGetComp<CompBodyAnimator>().isAnimating);
|
||||
}
|
||||
|
||||
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
|
||||
|
|
Loading…
Reference in a new issue