소스 검색

Lesson 20.5

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());