From b1fd5aecea782a59bf3ce68d9735e59f77166ac6 Mon Sep 17 00:00:00 2001 From: hadashiA Date: Fri, 15 Nov 2024 16:25:15 +0900 Subject: [PATCH] Fix null error in duplication registration --- VContainer/Assets/VContainer/Runtime/Registry.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) &&