From 852e39fc187910155801bcb967bf2073edfd92e4 Mon Sep 17 00:00:00 2001 From: Morris Jette <jette@schedmd.com> Date: Fri, 25 Apr 2014 09:26:55 -0700 Subject: [PATCH] Add error handling to SchedTimeout patch --- src/slurmctld/job_scheduler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index c9ad2ee6cf6..887b8f626f3 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -1335,8 +1335,8 @@ next_part: part_ptr = (struct part_record *) list_iterator_destroy(job_iterator); if (part_iterator) list_iterator_destroy(part_iterator); - } else { - if (job_ptr->state_reason == WAIT_NO_REASON) + } else if (job_queue) { + if (job_ptr && (job_ptr->state_reason == WAIT_NO_REASON)) job_ptr->state_reason = WAIT_SCHED_TIMEOUT; while ((job_queue_rec = list_pop(job_queue))) { job_ptr = job_queue_rec->job_ptr; -- GitLab