autoSyndrome: fixed a bug where it complains because can't find the worker because it didn't get a copy of the job quickly enough. It can still happen, it just doesn't complain anymore.

develop
expwnent 2013-03-17 11:02:31 -04:00
parent cf57fba58e
commit cd00213e66
1 changed files with 7 additions and 0 deletions

@ -281,6 +281,13 @@ void processJob(color_ostream& out, void* jobPtr) {
}
df::unit* worker = df::unit::find(workerId);
if ( worker == NULL ) {
//out.print("%s, line %d: invalid worker.\n", __FILE__, __LINE__);
//this probably means that it finished before EventManager could get a copy of the job while the job was running
//TODO: consider printing a warning once
return;
}
//find the building that made it
int32_t buildingId = -1;
for ( size_t a = 0; a < job->general_refs.size(); a++ ) {