null ref check in cache clearing
This commit is contained in:
parent
dd82340545
commit
ed2a6fd7ab
Binary file not shown.
|
@ -16,7 +16,7 @@ namespace Rimworld_Animations
|
||||||
{
|
{
|
||||||
static bool ClearCache(Pawn pawn)
|
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)
|
public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
|
||||||
|
|
Loading…
Reference in New Issue