diff --git a/1.5/Assemblies/Rimworld-Animations.dll b/1.5/Assemblies/Rimworld-Animations.dll index fa7e05c..0edf7e7 100644 Binary files a/1.5/Assemblies/Rimworld-Animations.dll and b/1.5/Assemblies/Rimworld-Animations.dll differ diff --git a/1.5/Source/Comps/CompExtendedAnimator.cs b/1.5/Source/Comps/CompExtendedAnimator.cs index ed810fd..9782ae9 100644 --- a/1.5/Source/Comps/CompExtendedAnimator.cs +++ b/1.5/Source/Comps/CompExtendedAnimator.cs @@ -204,10 +204,10 @@ namespace Rimworld_Animations { public void CheckAndPlaySounds() { - PawnRenderNode rootNode = pawn.Drawer.renderer.renderTree.rootNode; + PawnRenderNode rootNode = pawn.Drawer?.renderer?.renderTree?.rootNode; //check if the rootnode has sounds; if so play it - if (rootNode.AnimationWorker is AnimationWorker_KeyframesExtended animWorker) + if (rootNode?.AnimationWorker is AnimationWorker_KeyframesExtended animWorker) { SoundDef sound = animWorker.soundAtTick(rootNode.tree.AnimationTick); if (sound != null) @@ -220,7 +220,7 @@ namespace Rimworld_Animations { //do the same for all the child nodes foreach (PawnRenderNode node in rootNode.children) { - if (node.AnimationWorker is AnimationWorker_KeyframesExtended childrenAnimWorker) + if (node?.AnimationWorker is AnimationWorker_KeyframesExtended childrenAnimWorker) { SoundDef sound = childrenAnimWorker.soundAtTick(node.tree.AnimationTick); if (sound != null)