Let workers_drain drop a queued fast-link job without reading its missing library.

link_queue puts a draw's fast link on the library queue as a LibJob with p set and no library (b NULL); lib_worker and
pipe_worker branch on that, but workers_drain cleared j->b->job for every queued job, a NULL dereference when
vk_pipeline_shutdown found one. It now clears the library's fields only when the job has one and clears the
pipeline's link_queued when it names a pipeline. Only the probes shut the pipelines down (mesh_fb_probe.c,
vk_exec_probe.c); the game never does.

Not reproduced before the change (the probes need approval). vk_pipeline.c compiles with no new warnings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 17:17:01 -05:00
parent 339f391cf5
commit ea5087baf6

View File

@@ -5282,7 +5282,8 @@ static void workers_drain(void) {
A.low = A.low_tail = NULL;
for (LibJob *j = U.head, *n; j; j = n) { // queued library jobs too: their entries read as failed builds
n = j->next;
j->b->job = NULL, j->b->building = 0;
if (j->b) j->b->job = NULL, j->b->building = 0; // a draw's fast link (link_queue) names its pipeline, not a library
if (j->p) j->p->link_queued = 0;
free(j);
}
U.head = U.tail = NULL;