diff --git a/NewHorizons/Builder/Props/DialogueBuilder.cs b/NewHorizons/Builder/Props/DialogueBuilder.cs index e2d2cf6f..f917c973 100644 --- a/NewHorizons/Builder/Props/DialogueBuilder.cs +++ b/NewHorizons/Builder/Props/DialogueBuilder.cs @@ -4,6 +4,9 @@ using OWML.Common; using System.IO; using System.Xml; using UnityEngine; +using NewHorizons.Utility; +using Logger = NewHorizons.Utility.Logger; + namespace NewHorizons.Builder.Props { public static class DialogueBuilder @@ -110,6 +113,12 @@ namespace NewHorizons.Builder.Props { var character = go.transform.Find(info.pathToAnimController); + if (character == null) + { + Logger.LogError($"Couldn't find child of {go.transform.GetPath()} at {info.pathToAnimController}"); + return; + } + // At most one of these should ever not be null var nomaiController = character.GetComponent(); var controller = character.GetComponent();