Don't break if we find a null script in FontReplacer

This commit is contained in:
_nebula 2023-03-04 13:29:58 +00:00
parent 3e30535e8d
commit 6dcb938ad5

View File

@ -13,6 +13,12 @@ public static class FontReplacer
foreach (var monoBehaviour in prefab.GetComponentsInChildren<MonoBehaviour>(true))
{
if (monoBehaviour == null)
{
DebugLog.ToConsole($"Null monobehaviour found on {prefab.name}!", OWML.Common.MessageType.Warning);
continue;
}
var publicFields = monoBehaviour
.GetType()
.GetFields(BindingFlags.Public | BindingFlags.Instance);