From 4be62122ab2b8aa25fd5fe3c99da1aade0f944c0 Mon Sep 17 00:00:00 2001 From: Evan Hemsley Date: Wed, 11 Mar 2020 17:02:00 -0700 Subject: [PATCH] fix lookup crash on component that is only read by renderers --- encompass-cs/Collections/ComponentStore.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encompass-cs/Collections/ComponentStore.cs b/encompass-cs/Collections/ComponentStore.cs index 0645510..dbe1a95 100644 --- a/encompass-cs/Collections/ComponentStore.cs +++ b/encompass-cs/Collections/ComponentStore.cs @@ -33,7 +33,7 @@ namespace Encompass private TypedComponentStore Lookup() where TComponent : struct, IComponent { - //RegisterComponentType(); + if (!Stores.ContainsKey(typeof(TComponent))) { RegisterComponentType(); } return Stores[typeof(TComponent)] as TypedComponentStore; }