better error handling for checkandplaysounds

This commit is contained in:
c0ffee 2024-04-22 17:38:30 -07:00
parent 3f7a7bfdc3
commit 66f84a00f3
2 changed files with 12 additions and 7 deletions

View File

@ -217,8 +217,10 @@ namespace Rimworld_Animations {
} }
//do the same for all the child nodes
foreach (PawnRenderNode node in rootNode.children) if (rootNode?.children != null)
{
foreach (PawnRenderNode node in rootNode?.children)
{ {
if (node?.AnimationWorker is AnimationWorker_KeyframesExtended childrenAnimWorker) if (node?.AnimationWorker is AnimationWorker_KeyframesExtended childrenAnimWorker)
{ {
@ -231,6 +233,9 @@ namespace Rimworld_Animations {
} }
} }
} }
//do the same for all the child nodes
}
public bool AnimationMakesUseOfProp(AnimationPropDef animationProp) public bool AnimationMakesUseOfProp(AnimationPropDef animationProp)
{ {