Browse Source

Lesson 20.5

Godzil 3 years ago
parent
commit
de6d748a6a
1 changed files with 4 additions and 1 deletions
  1. 4 1
      source/ECS.cpp

+ 4 - 1
source/ECS.cpp

@@ -149,7 +149,10 @@ void Registry::update()
 
         for(auto pool: this->componentPools)
         {
-            pool->removeEntityFromPool(entity.getId());
+            if (pool != nullptr)
+            {
+                pool->removeEntityFromPool(entity.getId());
+            }
         }
 
         this->freeIds.push_back(entity.getId());