소스 검색

fix deadlock

Kolja Strohm 3 년 전
부모
커밋
eae1cfdd7e
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      FactoryCraft/World.cpp

+ 2 - 0
FactoryCraft/World.cpp

@@ -70,8 +70,10 @@ void World::update( bool background )
     Entity* player = getCurrentPlayerEntity();
     if( player )
     {
+        renderedWorld->lock();
         for( Dimension* dim : *dimensions )
             dim->removeDistantChunks( { (int)player->getPos().x, (int)player->getPos().y }, this );
+        renderedWorld->unlock();
     }
 }