Fixes bug in manageJobStartedEvent

develop
Josh Cooper 2021-08-06 07:58:22 -07:00 committed by Myk
parent 24255d3195
commit 07ffa0b8da
1 changed files with 4 additions and 2 deletions

@ -438,8 +438,10 @@ static void manageJobStartedEvent(color_ostream& out){
// build a list of newly started jobs
for ( df::job_list_link* link = &df::global::world->jobs.list; link != NULL; link = link->next ) {
df::job* job = link->item;
if(Job::getWorker(job) && startedJobs.emplace(job).second){
newly_started_jobs.push_back(job);
if (job && Job::getWorker(job)) {
if (startedJobs.emplace(job).second) {
newly_started_jobs.push_back(job);
}
}
}
if (tick - eventLastTick[handler.eventHandler] >= handler.freq) {