diff --git a/VContainer/Assets/VContainer/Runtime/Registry.cs b/VContainer/Assets/VContainer/Runtime/Registry.cs index 7117a6a6..f348ff8f 100644 --- a/VContainer/Assets/VContainer/Runtime/Registry.cs +++ b/VContainer/Assets/VContainer/Runtime/Registry.cs @@ -46,7 +46,7 @@ public static Registry Build(Registration[] registrations) static void AddToBuildBuffer(IDictionary buf, Type service, Registration registration) { - if (buf.TryGetValue(service, out var exists)) + if (buf.TryGetValue(service, out var exists) && exists != null) { CollectionInstanceProvider collection; if (buf.TryGetValue(RuntimeTypeCache.EnumerableTypeOf(service), out var found) &&