mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
Don't break if we find a null script in FontReplacer
This commit is contained in:
parent
3e30535e8d
commit
6dcb938ad5
@ -13,6 +13,12 @@ public static class FontReplacer
|
|||||||
|
|
||||||
foreach (var monoBehaviour in prefab.GetComponentsInChildren<MonoBehaviour>(true))
|
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
|
var publicFields = monoBehaviour
|
||||||
.GetType()
|
.GetType()
|
||||||
.GetFields(BindingFlags.Public | BindingFlags.Instance);
|
.GetFields(BindingFlags.Public | BindingFlags.Instance);
|
||||||
|
Loading…
Reference in New Issue
Block a user