summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bio.c b/src/bio.c
index 6f2c8a6c0..fc4d56695 100644
--- a/src/bio.c
+++ b/src/bio.c
@@ -188,6 +188,10 @@ time_t bioOlderJobOfType(int type) {
pthread_mutex_lock(&bio_mutex[type]);
ln = listFirst(bio_jobs[type]);
+ if (ln == NULL) {
+ pthread_mutex_unlock(&bio_mutex[type]);
+ return 0;
+ }
job = ln->value;
time = job->time;
pthread_mutex_unlock(&bio_mutex[type]);