builtin/worldgen: Fix some kind of issue that killed the generator thread

master
Perttu Ahola 2014-11-03 17:15:34 +02:00
parent 4f9939c547
commit c645fea5cd
1 changed files with 5 additions and 3 deletions

View File

@ -251,9 +251,11 @@ void GenerateThread::run(interface::Thread *thread)
// Generate one section for each instance
for(auto &pair: m_module->m_instances){
up_<CInstance> &instance = pair.second;
if(!instance->m_enabled && !instance->m_queued_sections.empty()){
// Has to be checked later
m_module->m_queued_sections_sem.post();
if(!instance->m_enabled){
if(!instance->m_queued_sections.empty()){
// Has to be checked later
m_module->m_queued_sections_sem.post();
}
continue;
}
instance->generate_next_section();