Godzil пре 3 година
родитељ
комит
de6d748a6a
1 измењених фајлова са 4 додато и 1 уклоњено
  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());