check entity in store before remove component
							parent
							
								
									5299d6ddad
								
							
						
					
					
						commit
						570b6832ad
					
				|  | @ -52,7 +52,10 @@ namespace Encompass | |||
| 
 | ||||
|         public void RemoveComponent<TComponent>(Entity entity) where TComponent : struct, IComponent | ||||
|         { | ||||
|             entities[entity].Set(TypeToIndex[typeof(TComponent)], false); | ||||
|             if (entities.ContainsKey(entity)) | ||||
|             { | ||||
|                 entities[entity].Set(TypeToIndex[typeof(TComponent)], false); | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
|         public void RemoveEntity(Entity entity) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue